var tb_pathToImage="images/loadingAnimation.gif",slideshowMode=false,intervalId=null,delay=5000;
/*!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
$(document).ready(function(){tb_init("a.thickbox, area.thickbox, input.thickbox");imgLoader=new Image();imgLoader.src=tb_pathToImage});function tb_init(A){$(A).click(function(){var C=this.title||this.name||null;var B=this.href||this.alt;var D=this.rel||false;tb_show(C,B,D);this.blur();return false})}function tb_start(A,B,C){slideshowMode=true;tb_show(A,B,C);intervalId=setInterval(tb_next,delay)}function tb_next(){if($("#TB_next").length>0){$("#TB_next").click()}else{tb_remove()}}function tb_setDelay(A){clearInterval(intervalId);if(A=="slow"){delay=10000}else{if(A=="medium"){delay=5000}else{if(A=="fast"){delay=3000}}}$(".delay").removeClass("selected");$("#"+A).addClass("selected");intervalId=setInterval(tb_next,delay)}function tb_show(K,C,I){try{if(typeof document.body.style.maxHeight==="undefined"){$("body","html").css({height:"100%",width:"100%"});$("html").css("overflow","hidden");if(document.getElementById("TB_HideSelect")===null){$("form").append("<iframe id='TB_HideSelect'></iframe><div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}else{if(document.getElementById("TB_overlay")===null){$("form").append("<div id='TB_overlay'></div><div id='TB_window'></div>");$("#TB_overlay").click(tb_remove)}}if(tb_detectMacXFF()){$("#TB_overlay").addClass("TB_overlayMacFFBGHack")}else{$("#TB_overlay").addClass("TB_overlayBG")}if(K===null){K=""}$("form").append("<div id='TB_load'><img src='"+imgLoader.src+"' /></div>");$("#TB_load").show();var D;if(C.indexOf("?")!==-1){D=C.substr(0,C.indexOf("?"))}else{D=C}var G=/\.jpg$|\.jpeg$|\.png$|\.gif$|\.bmp$/;var L=D.toLowerCase().match(G);if(L==".jpg"||L==".jpeg"||L==".png"||L==".gif"||L==".bmp"){TB_PrevCaption="";TB_PrevURL="";TB_PrevHTML="";TB_NextCaption="";TB_NextURL="";TB_NextHTML="";TB_imageCount="";TB_FoundURL=false;if(I){TB_TempArray=$("a[rel="+I+"]").get();for(TB_Counter=0;((TB_Counter<TB_TempArray.length)&&(TB_NextHTML===""));TB_Counter++){var H=TB_TempArray[TB_Counter].href.toLowerCase().match(G);if(!(TB_TempArray[TB_Counter].href==C)){if(TB_FoundURL){TB_NextCaption=TB_TempArray[TB_Counter].title;TB_NextURL=TB_TempArray[TB_Counter].href;TB_NextHTML="<span id='TB_next'>&nbsp;&nbsp;<a title='View the next photo' href='#'>Next &gt;</a></span>"}else{TB_PrevCaption=TB_TempArray[TB_Counter].title;TB_PrevURL=TB_TempArray[TB_Counter].href;TB_PrevHTML="<span id='TB_prev'>&nbsp;&nbsp;<a title='View the previous photo' href='#'>&lt; Prev</a></span>"}}else{TB_FoundURL=true;TB_imageCount="Photo "+(TB_Counter+1)+" of "+(TB_TempArray.length)}}}imgPreloader=new Image();imgPreloader.onload=function(){imgPreloader.onload=null;var P=tb_getPageSize();var N=P[0]-150;var T=P[1]-150;var O=imgPreloader.width;var M=imgPreloader.height;if(O>N){M=M*(N/O);O=N;if(M>T){O=O*(T/M);M=T}}else{if(M>T){O=O*(T/M);M=T;if(O>N){M=M*(N/O);O=N}}}TB_WIDTH=O+30;TB_HEIGHT=M+60;var R="<div id='TB_photoHeader' style='text-align:center; padding-top:5px'>";if(slideshowMode){R+="<a id='slow' class='delay' href='javascript:tb_setDelay(\"slow\")'>slow</a> | <a id='medium' class='delay' href='javascript:tb_setDelay(\"medium\")'>medium</a> | <a id='fast' class='delay' href='javascript:tb_setDelay(\"fast\")'>fast</a>"}else{R+="<a href='javascript:printPage()'>print</a>"}R+="</div>";$("#TB_window").append(R+"<a href='' id='TB_ImageOff' title='Close'><img id='TB_Image' src='"+C+"' width='"+O+"' height='"+M+"' alt='"+K+"'/></a><div id='TB_caption'>"+K+"<div id='TB_secondLine'>"+TB_imageCount+TB_PrevHTML+TB_NextHTML+"</div></div><div id='TB_closeWindow'><a href='#' id='TB_closeWindowButton' title='Close'>close</a></div>");if(delay==3000){$("#fast").addClass("selected")}else{if(delay==5000){$("#medium").addClass("selected")}else{if(delay==10000){$("#slow").addClass("selected")}}}$("#TB_closeWindowButton").click(tb_remove);if(!(TB_PrevHTML==="")){function S(){clearInterval(intervalId);if($(document).unbind("click",S)){$(document).unbind("click",S)}$("#TB_window").remove();$("form").append("<div id='TB_window'></div>");tb_show(TB_PrevCaption,TB_PrevURL,I);if(slideshowMode){intervalId=setInterval(tb_next,delay)}return false}$("#TB_prev").click(S)}if(!(TB_NextHTML==="")){function Q(){clearInterval(intervalId);$("#TB_window").remove();$("form").append("<div id='TB_window'></div>");tb_show(TB_NextCaption,TB_NextURL,I);if(slideshowMode){intervalId=setInterval(tb_next,delay)}return false}$("#TB_next").click(Q)}document.onkeydown=function(U){if(U==null){keycode=event.keyCode}else{keycode=U.which}if(keycode==27){tb_remove()}else{if(keycode==190){if(!(TB_NextHTML=="")){document.onkeydown="";Q()}}else{if(keycode==188){if(!(TB_PrevHTML=="")){document.onkeydown="";S()}}}}};tb_position();$("#TB_load").remove();$("#TB_ImageOff").click(tb_remove);$("#TB_window").css({display:"block"})};imgPreloader.src=C}else{C=C.substring(C.indexOf("#"));var B=C.replace(/^[^\?]+\??/,"");var F=tb_parseQuery(B);TB_WIDTH=(F.width*1)+30||665;TB_HEIGHT=(F.height*1)+40||565;var E=$(window).width();var A=$(window).height();if(E<TB_WIDTH){TB_WIDTH=E}if(A<TB_HEIGHT){TB_HEIGHT=A}$(window).resize(function(){$("#TB_window").unload();tb_show(K,C,I)});ajaxContentW=TB_WIDTH-30;ajaxContentH=TB_HEIGHT-45;if(C.indexOf("TB_iframe")!=-1){urlNoQuery=C.split("TB_");$("#TB_iframeContent").remove();if(F.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+K+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div></div><iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;' > </iframe>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<iframe frameborder='0' hspace='0' src='"+urlNoQuery[0]+"' id='TB_iframeContent' name='TB_iframeContent"+Math.round(Math.random()*1000)+"' onload='tb_showIframe()' style='width:"+(ajaxContentW+29)+"px;height:"+(ajaxContentH+17)+"px;'> </iframe>")}}else{if($("#TB_window").css("display")!="block"){if(F.modal!="true"){$("#TB_window").append("<div id='TB_title'><div id='TB_ajaxWindowTitle'>"+K+"</div><div id='TB_closeAjaxWindow'><a href='#' id='TB_closeWindowButton' title='Close'></a></div></div><div id='TB_ajaxContent' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px'></div>")}else{$("#TB_overlay").unbind();$("#TB_window").append("<div id='TB_ajaxContent' class='TB_modal' style='width:"+ajaxContentW+"px;height:"+ajaxContentH+"px;'></div>")}}else{$("#TB_ajaxContent")[0].style.width=ajaxContentW+"px";$("#TB_ajaxContent")[0].style.height=ajaxContentH+"px";$("#TB_ajaxContent")[0].scrollTop=0;$("#TB_ajaxWindowTitle").html(K)}}$("#TB_closeWindowButton").click(tb_remove);if(C.indexOf("TB_inline")!=-1){$("#TB_ajaxContent").append($("#"+F.inlineId).children());$("#TB_window").unload(function(){$("#"+F.inlineId).append($("#TB_ajaxContent").children())});tb_position();$("#TB_load").remove();$("#TB_window").css({display:"block"})}else{if(C.indexOf("TB_iframe")!=-1){tb_position();if($.browser.safari){$("#TB_load").remove();$("#TB_window").css({display:"block"})}}else{$("#TB_ajaxContent").load(C+="&random="+(new Date().getTime()),function(){tb_position();$("#TB_load").remove();tb_init("#TB_ajaxContent a.thickbox");$("#TB_window").css({display:"block"})})}}}if(!F.modal){document.onkeyup=function(M){if(M==null){keycode=event.keyCode}else{keycode=M.which}if(keycode==27){tb_remove()}}}}catch(J){}}function tb_showIframe(){$("#TB_load").remove();$("#TB_window").css({display:"block"})}function tb_remove(){$(window).unbind("resize");$("#TB_imageOff").unbind("click");$("#TB_closeWindowButton").unbind("click");$("#TB_window").fadeOut("fast",function(){$("#TB_window,#TB_overlay,#TB_HideSelect").trigger("unload").unbind().remove()});$("#TB_load").remove();if(typeof document.body.style.maxHeight=="undefined"){$("body","html").css({height:"auto",width:"auto"});$("html").css("overflow","")}document.onkeydown="";document.onkeyup="";clearInterval(intervalId);slideshowMode=false;Page_BlockSubmit=false;return false}function tb_position(){$("#TB_window").css({marginLeft:"-"+parseInt((TB_WIDTH/2),10)+"px",width:TB_WIDTH+"px"});if(!(jQuery.browser.msie&&jQuery.browser.version<7)){$("#TB_window").css({marginTop:"-"+parseInt((TB_HEIGHT/2),10)+"px"})}}function tb_parseQuery(D){var E={};if(!D){return E}var A=D.split(/[;&]/);for(var C=0;C<A.length;C++){var G=A[C].split("=");if(!G||G.length!=2){continue}var B=unescape(G[0]);var F=unescape(G[1]);F=F.replace(/\+/g," ");E[B]=F}return E}function tb_getPageSize(){var C=document.documentElement;var A=window.innerWidth||self.innerWidth||(C&&C.clientWidth)||document.body.clientWidth;var B=window.innerHeight||self.innerHeight||(C&&C.clientHeight)||document.body.clientHeight;arrayPageSize=[A,B];return arrayPageSize}function tb_detectMacXFF(){var A=navigator.userAgent.toLowerCase();if(A.indexOf("mac")!=-1&&A.indexOf("firefox")!=-1){return true}};