$(window).load(function(){$("#colorslider").nivoSlider({effect:"fold",slices:1,animSpeed:3000,pauseTime:6500,directionNav:false,directionNavHide:true,controlNav:false,keyboardNav:false,pauseOnHover:false,manualAdvance:false,captionOpacity:0,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){}});});$(window).load(function(){$("#slider").nivoSlider({effect:"random",slices:15,animSpeed:500,pauseTime:3500,directionNav:false,directionNavHide:false,controlNav:true,keyboardNav:false,pauseOnHover:true,manualAdvance:false,captionOpacity:0,beforeChange:function(){},afterChange:function(){},slideshowEnd:function(){}});});(function(bu,aT){var bc={version:"3.0.3"};var bi=navigator.userAgent.toLowerCase();if(bi.indexOf("windows")>-1||bi.indexOf("win32")>-1){bc.isWindows=true;}else{if(bi.indexOf("macintosh")>-1||bi.indexOf("mac os x")>-1){bc.isMac=true;}else{if(bi.indexOf("linux")>-1){bc.isLinux=true;}}}bc.isIE=bi.indexOf("msie")>-1;bc.isIE6=bi.indexOf("msie 6")>-1;bc.isIE7=bi.indexOf("msie 7")>-1;bc.isGecko=bi.indexOf("gecko")>-1&&bi.indexOf("safari")==-1;bc.isWebKit=bi.indexOf("applewebkit/")>-1;var bP=/#(.+)$/,bL=/^(light|shadow)box\[(.*?)\]/i,bk=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,aY=/[0-9a-z]+$/i,bT=/(.+\/)shadowbox\.js/i;var bz=false,a3=false,aS={},K=0,bb,bB;bc.current=-1;bc.dimensions=null;bc.ease=function(a){return 1+Math.pow(a-1,3);};bc.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}};bc.gallery=[];bc.onReady=bH;bc.path=null;bc.player=null;bc.playerId="sb-player";bc.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:bH,onClose:bH,onFinish:bH,onOpen:bH,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};bc.getCurrent=function(){return bc.current>-1?bc.gallery[bc.current]:null;};bc.hasNext=function(){return bc.gallery.length>1&&(bc.current!=bc.gallery.length-1||bc.options.continuous);};bc.isOpen=function(){return bz;};bc.isPaused=function(){return bB=="pause";};bc.applyOptions=function(a){aS=bU({},bc.options);bU(bc.options,a);};bc.revertOptions=function(){bU(bc.options,aS);};bc.init=function(c,e){if(a3){return;}a3=true;if(bc.skin.options){bU(bc.options,bc.skin.options);}if(c){bU(bc.options,c);}if(!bc.path){var f,d=document.getElementsByTagName("script");for(var a=0,b=d.length;a<b;++a){f=bT.exec(d[a].src);if(f){bc.path=f[1];break;}}}if(e){bc.onReady=e;}bd();};bc.open=function(b){if(bz){return;}var a=bc.makeGallery(b);bc.gallery=a[0];bc.current=a[1];b=bc.getCurrent();if(b==null){return;}bc.applyOptions(b.options||{});bn();if(bc.gallery.length){b=bc.getCurrent();if(bc.options.onOpen(b)===false){return;}bz=true;bc.skin.onOpen(b,a1);}};bc.close=function(){if(!bz){return;}bz=false;if(bc.player){bc.player.remove();bc.player=null;}if(typeof bB=="number"){clearTimeout(bB);bB=null;}K=0;bA(false);bc.options.onClose(bc.getCurrent());bc.skin.onClose();bc.revertOptions();};bc.play=function(){if(!bc.hasNext()){return;}if(!K){K=bc.options.slideshowDelay*1000;}if(K){bb=bq();bB=setTimeout(function(){K=bb=0;bc.next();},K);if(bc.skin.onPlay){bc.skin.onPlay();}}};bc.pause=function(){if(typeof bB!="number"){return;}K=Math.max(0,K-(bq()-bb));if(K){clearTimeout(bB);bB="pause";if(bc.skin.onPause){bc.skin.onPause();}}};bc.change=function(a){if(!(a in bc.gallery)){if(bc.options.continuous){a=(a<0?bc.gallery.length+a:0);if(!(a in bc.gallery)){return;}}else{return;}}bc.current=a;if(typeof bB=="number"){clearTimeout(bB);bB=null;K=bb=0;}bc.options.onChange(bc.getCurrent());a1(true);};bc.next=function(){bc.change(bc.current+1);};bc.previous=function(){bc.change(bc.current-1);};bc.setDimensions=function(f,a,h,g,b,i,k,n){var l=f,c=a;var m=2*k+b;if(f+m>h){f=h-m;}var d=2*k+i;if(a+d>g){a=g-d;}var e=(l-f)/l,j=(c-a)/c,o=(e>0||j>0);if(n&&o){if(e>j){a=Math.round((c/l)*f);}else{if(j>e){f=Math.round((l/c)*a);}}}bc.dimensions={height:f+b,width:a+i,innerHeight:f,innerWidth:a,top:Math.floor((h-(f+m))/2+k),left:Math.floor((g-(a+d))/2+k),oversized:o};return bc.dimensions;};bc.makeGallery=function(f){var c=[],a=-1;if(typeof f=="string"){f=[f];}if(typeof f.length=="number"){bR(f,function(h,g){if(g.content){c[h]=g;}else{c[h]={content:g};}});a=0;}else{if(f.tagName){var d=bc.getCache(f);f=d?d:bc.makeObject(f);}if(f.gallery){c=[];var e;for(var b in bc.cache){e=bc.cache[b];if(e.gallery&&e.gallery==f.gallery){if(a==-1&&e.content==f.content){a=c.length;}c.push(e);}}if(a==-1){c.unshift(f);a=0;}}else{c=[f];a=0;}}bR(c,function(h,g){c[h]=bU({},g);});return[c,a];};bc.makeObject=function(a,c){var e={content:a.href,title:a.getAttribute("title")||"",link:a};if(c){c=bU({},c);bR(["player","title","height","width","gallery"],function(g,f){if(typeof c[f]!="undefined"){e[f]=c[f];delete c[f];}});e.options=c;}else{e.options={};}if(!e.player){e.player=bc.getPlayer(e.content);}var b=a.getAttribute("rel");if(b){var d=b.match(bL);if(d){e.gallery=escape(d[2]);}bR(b.split(";"),function(g,f){d=f.match(bk);if(d){e[d[1]]=d[2];}});}return e;};bc.getPlayer=function(c){if(c.indexOf("#")>-1&&c.indexOf(document.location.href)==0){return"inline";}var a=c.indexOf("?");if(a>-1){c=c.substring(0,a);}var d,b=c.match(aY);if(b){d=b[0].toLowerCase();}if(d){if(bc.img&&bc.img.ext.indexOf(d)>-1){return"img";}if(bc.swf&&bc.swf.ext.indexOf(d)>-1){return"swf";}if(bc.flv&&bc.flv.ext.indexOf(d)>-1){return"flv";}if(bc.qt&&bc.qt.ext.indexOf(d)>-1){if(bc.wmp&&bc.wmp.ext.indexOf(d)>-1){return"qtwmp";}else{return"qt";}}if(bc.wmp&&bc.wmp.ext.indexOf(d)>-1){return"wmp";}}return"iframe";};function bn(){var c=bc.errorInfo,b=bc.plugins,k,j,g,d,h,e,i,f;for(var a=0;a<bc.gallery.length;++a){k=bc.gallery[a];j=false;g=null;switch(k.player){case"flv":case"swf":if(!b.fla){g="fla";}break;case"qt":if(!b.qt){g="qt";}break;case"wmp":if(bc.isMac){if(b.qt&&b.f4m){k.player="qt";}else{g="qtf4m";}}else{if(!b.wmp){g="wmp";}}break;case"qtwmp":if(b.qt){k.player="qt";}else{if(b.wmp){k.player="wmp";}else{g="qtwmp";}}break;}if(g){if(bc.options.handleUnsupported=="link"){switch(g){case"qtf4m":h="shared";e=[c.qt.url,c.qt.name,c.f4m.url,c.f4m.name];break;case"qtwmp":h="either";e=[c.qt.url,c.qt.name,c.wmp.url,c.wmp.name];break;default:h="single";e=[c[g].url,c[g].name];}k.player="html";k.content='<div class="sb-message">'+aL(bc.lang.errors[h],e)+"</div>";}else{j=true;}}else{if(k.player=="inline"){d=bP.exec(k.content);if(d){i=bN(d[1]);if(i){k.content=i.innerHTML;}else{j=true;}}else{j=true;}}else{if(k.player=="swf"||k.player=="flv"){f=(k.options&&k.options.flashVersion)||bc.options.flashVersion;if(bc.flash&&!bc.flash.hasFlashPlayerVersion(f)){k.width=310;k.height=177;}}}}if(j){bc.gallery.splice(a,1);if(a<bc.current){--bc.current;}else{if(a==bc.current){bc.current=a>0?a-1:a;}}--a;}}}function bA(a){if(!bc.options.enableKeys){return;}(a?bp:bg)(document,"keydown",bD);}function bD(b){if(b.metaKey||b.shiftKey||b.altKey||b.ctrlKey){return;}var c=aI(b),a;switch(c){case 81:case 88:case 27:a=bc.close;break;case 37:a=bc.previous;break;case 39:a=bc.next;break;case 32:a=typeof bB=="number"?bc.pause:bc.play;break;}if(a){aQ(b);a();}}function a1(e){bA(false);var f=bc.getCurrent();var c=(f.player=="inline"?"html":f.player);if(typeof bc[c]!="function"){throw"unknown player "+c;}if(e){bc.player.remove();bc.revertOptions();bc.applyOptions(f.options||{});}bc.player=new bc[c](f,bc.playerId);if(bc.gallery.length>1){var a=bc.gallery[bc.current+1]||bc.gallery[0];if(a.player=="img"){var d=new Image();d.src=a.content;}var g=bc.gallery[bc.current-1]||bc.gallery[bc.gallery.length-1];if(g.player=="img"){var b=new Image();b.src=g.content;}}bc.skin.onLoad(e,a7);}function a7(){if(!bz){return;}if(typeof bc.player.ready!="undefined"){var a=setInterval(function(){if(bz){if(bc.player.ready){clearInterval(a);a=null;bc.skin.onReady(aZ);}}else{clearInterval(a);a=null;}},10);}else{bc.skin.onReady(aZ);}}function aZ(){if(!bz){return;}bc.player.append(bc.skin.body,bc.dimensions);bc.skin.onShow(bj);}function bj(){if(!bz){return;}if(bc.player.onLoad){bc.player.onLoad();}bc.options.onFinish(bc.getCurrent());if(!bc.isPaused()){bc.play();}bA(true);}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,b){var a=this.length>>>0;b=b||0;if(b<0){b+=a;}for(;b<a;++b){if(b in this&&this[b]===c){return b;}}return -1;};}function bq(){return(new Date).getTime();}function bU(b,a){for(var c in a){b[c]=a[c];}return b;}function bR(a,e){var d=0,c=a.length;for(var b=a[0];d<c&&e.call(b,d,b)!==false;b=a[++d]){}}function aL(b,a){return b.replace(/\{(\w+?)\}/g,function(d,c){return a[c];});}function bH(){}function bN(a){return document.getElementById(a);}function bv(a){a.parentNode.removeChild(a);}var aW=true,aG=true;function a0(){var a=document.body,b=document.createElement("div");aW=typeof b.style.opacity==="string";b.style.position="fixed";b.style.margin=0;b.style.top="20px";a.appendChild(b,a.firstChild);aG=b.offsetTop==20;a.removeChild(b);}bc.getStyle=(function(){var a=/opacity=([^)]*)/,b=document.defaultView&&document.defaultView.getComputedStyle;return function(e,f){var c;if(!aW&&f=="opacity"&&e.currentStyle){c=a.test(e.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return c===""?"1":c;}if(b){var d=b(e,null);if(d){c=d[f];}if(f=="opacity"&&c==""){c="1";}}else{c=e.currentStyle[f];}return c;};})();bc.appendHTML=function(c,d){if(c.insertAdjacentHTML){c.insertAdjacentHTML("BeforeEnd",d);}else{if(c.lastChild){var b=c.ownerDocument.createRange();b.setStartAfter(c.lastChild);var a=b.createContextualFragment(d);c.appendChild(a);}else{c.innerHTML=d;}}};bc.getWindowSize=function(a){if(document.compatMode==="CSS1Compat"){return document.documentElement["client"+a];}return document.body["client"+a];};bc.setOpacity=function(b,a){var c=b.style;if(aW){c.opacity=(a==1?"":a);}else{c.zoom=1;if(a==1){if(typeof c.filter=="string"&&(/alpha/i).test(c.filter)){c.filter=c.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"");}}else{c.filter=(c.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(a*100)+")";}}};bc.clearOpacity=function(a){bc.setOpacity(a,1);};function aP(a){return a.target;}function a8(a){return[a.pageX,a.pageY];}function aQ(a){a.preventDefault();}function aI(a){return a.keyCode;}function bp(b,c,a){jQuery(b).bind(c,a);}function bg(b,c,a){jQuery(b).unbind(c,a);}jQuery.fn.shadowbox=function(a){return this.each(function(){var c=jQuery(this);var b=jQuery.extend({},a||{},jQuery.metadata?c.metadata():jQuery.meta?c.data():{});var d=this.className||"";b.width=parseInt((d.match(/w:(\d+)/)||[])[1])||b.width;b.height=parseInt((d.match(/h:(\d+)/)||[])[1])||b.height;Shadowbox.setup(c,b);});};var S=false,bF;if(document.addEventListener){bF=function(){document.removeEventListener("DOMContentLoaded",bF,false);bc.load();};}else{if(document.attachEvent){bF=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",bF);bc.load();}};}}function aX(){if(S){return;}try{document.documentElement.doScroll("left");}catch(a){setTimeout(aX,1);return;}bc.load();}function bd(){if(document.readyState==="complete"){return bc.load();}if(document.addEventListener){document.addEventListener("DOMContentLoaded",bF,false);bu.addEventListener("load",bc.load,false);}else{if(document.attachEvent){document.attachEvent("onreadystatechange",bF);bu.attachEvent("onload",bc.load);var a=false;try{a=bu.frameElement===null;}catch(b){}if(document.documentElement.doScroll&&a){aX();}}}}bc.load=function(){if(S){return;}if(!document.body){return setTimeout(bc.load,13);}S=true;a0();bc.onReady();if(!bc.options.skipSetup){bc.setup();}bc.skin.init();};bc.plugins={};if(navigator.plugins&&navigator.plugins.length){var aH=[];bR(navigator.plugins,function(a,b){aH.push(b.name);});aH=aH.join(",");var bI=aH.indexOf("Flip4Mac")>-1;bc.plugins={fla:aH.indexOf("Shockwave Flash")>-1,qt:aH.indexOf("QuickTime")>-1,wmp:!bI&&aH.indexOf("Windows Media")>-1,f4m:bI};}else{var aO=function(b){var c;try{c=new ActiveXObject(b);}catch(a){}return !!c;};bc.plugins={fla:aO("ShockwaveFlash.ShockwaveFlash"),qt:aO("QuickTime.QuickTime"),wmp:aO("wmplayer.ocx"),f4m:false};}var a6=/^(light|shadow)box/i,bE="shadowboxCacheKey",a2=1;bc.cache={};bc.select=function(d){var c=[];if(!d){var b;bR(document.getElementsByTagName("a"),function(g,f){b=f.getAttribute("rel");if(b&&a6.test(b)){c.push(f);}});}else{var e=d.length;if(e){if(typeof d=="string"){if(bc.find){c=bc.find(d);}}else{if(e==2&&typeof d[0]=="string"&&d[1].nodeType){if(bc.find){c=bc.find(d[0],d[1]);}}else{for(var a=0;a<e;++a){c[a]=d[a];}}}}else{c.push(d);}}return c;};bc.setup=function(a,b){bR(bc.select(a),function(d,c){bc.addCache(c,b);});};bc.teardown=function(a){bR(bc.select(a),function(c,b){bc.removeCache(b);});};bc.addCache=function(b,a){var c=b[bE];if(c==aT){c=a2++;b[bE]=c;bp(b,"click",aJ);}bc.cache[c]=bc.makeObject(b,a);};bc.removeCache=function(a){bg(a,"click",aJ);delete bc.cache[a[bE]];a[bE]=null;};bc.getCache=function(b){var a=b[bE];return(a in bc.cache&&bc.cache[a]);};bc.clearCache=function(){for(var a in bc.cache){bc.removeCache(bc.cache[a].link);}bc.cache={};};function aJ(a){bc.open(this);if(bc.gallery.length){aQ(a);}}bc.lang={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'You must install both the <a href="{0}">{1}</a> and <a href="{2}">{3}</a> browser plugins to view this content.',either:'You must install either the <a href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};var bt,bw="sb-drag-proxy",bs,aU,bK;function bo(){bs={x:0,y:0,startX:null,startY:null};}function bW(){var a=bc.dimensions;bU(aU.style,{height:a.innerHeight+"px",width:a.innerWidth+"px"});}function be(){bo();var a=["position:absolute","cursor:"+(bc.isGecko?"-moz-grab":"move"),"background-color:"+(bc.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");bc.appendHTML(bc.skin.body,'<div id="'+bw+'" style="'+a+'"></div>');aU=bN(bw);bW();bp(aU,"mousedown",bh);}function bx(){if(aU){bg(aU,"mousedown",bh);bv(aU);aU=null;}bK=null;}function bh(b){aQ(b);var a=a8(b);bs.startX=a[0];bs.startY=a[1];bK=bN(bc.player.id);bp(document,"mousemove",bm);bp(document,"mouseup",aV);if(bc.isGecko){aU.style.cursor="-moz-grabbing";}}function bm(f){var c=bc.player,e=bc.dimensions,a=a8(f);var b=a[0]-bs.startX;bs.startX+=b;bs.x=Math.max(Math.min(0,bs.x+b),e.innerWidth-c.width);var d=a[1]-bs.startY;bs.startY+=d;bs.y=Math.max(Math.min(0,bs.y+d),e.innerHeight-c.height);bU(bK.style,{left:bs.x+"px",top:bs.y+"px"});}function aV(){bg(document,"mousemove",bm);bg(document,"mouseup",aV);if(bc.isGecko){aU.style.cursor="-moz-grab";}}bc.img=function(c,b){this.obj=c;this.id=b;this.ready=false;var a=this;bt=new Image();bt.onload=function(){a.height=c.height?parseInt(c.height,10):bt.height;a.width=c.width?parseInt(c.width,10):bt.width;a.ready=true;bt.onload=null;bt=null;};bt.src=c.content;};bc.img.ext=["bmp","gif","jpg","jpeg","png"];bc.img.prototype={append:function(d,e){var c=document.createElement("img");c.id=this.id;c.src=this.obj.content;c.style.position="absolute";var b,a;if(e.oversized&&bc.options.handleOversize=="resize"){b=e.innerHeight;a=e.innerWidth;}else{b=this.height;a=this.width;}c.setAttribute("height",b);c.setAttribute("width",a);d.appendChild(c);},remove:function(){var a=bN(this.id);if(a){bv(a);}bx();if(bt){bt.onload=null;bt=null;}},onLoad:function(){var a=bc.dimensions;if(a.oversized&&bc.options.handleOversize=="drag"){be();}},onWindowResize:function(){var a=bc.dimensions;switch(bc.options.handleOversize){case"resize":var c=bN(this.id);c.height=a.innerHeight;c.width=a.innerWidth;break;case"drag":if(bK){var b=parseInt(bc.getStyle(bK,"top")),d=parseInt(bc.getStyle(bK,"left"));if(b+this.height<a.innerHeight){bK.style.top=a.innerHeight-this.height+"px";}if(d+this.width<a.innerWidth){bK.style.left=a.innerWidth-this.width+"px";}bW();}break;}}};var bC=false,a5=[],aN=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],bQ,bM,a4,aR=true;function bf(d,g,k,m,f){var h=(g=="opacity"),l=h?bc.setOpacity:function(o,p){o.style[g]=""+p+"px";};if(m==0||(!h&&!bc.options.animate)||(h&&!bc.options.animateFade)){l(d,k);if(f){f();}return;}var j=parseFloat(bc.getStyle(d,g))||0;var i=k-j;if(i==0){if(f){f();}return;}m*=1000;var c=bq(),n=bc.ease,a=c+m,b;var e=setInterval(function(){b=bq();if(b>=a){clearInterval(e);e=null;l(d,k);if(f){f();}}else{l(d,j+n((b-c)/m)*i);}},10);}function bV(){bQ.style.height=bc.getWindowSize("Height")+"px";bQ.style.width=bc.getWindowSize("Width")+"px";}function bS(){bQ.style.top=document.documentElement.scrollTop+"px";bQ.style.left=document.documentElement.scrollLeft+"px";}function bl(a){if(a){bR(a5,function(c,b){b[0].style.visibility=b[1]||"";});}else{a5=[];bR(bc.options.troubleElements,function(b,c){bR(document.getElementsByTagName(c),function(d,e){a5.push([e,e.style.visibility]);e.style.visibility="hidden";});});}}function aM(b,a){var c=bN("sb-nav-"+b);if(c){c.style.display=a?"":"none";}}function bJ(c,e){var f=bN("sb-loading"),b=bc.getCurrent().player,a=(b=="img"||b=="html");if(c){bc.setOpacity(f,0);f.style.display="block";var d=function(){bc.clearOpacity(f);if(e){e();}};if(a){bf(f,"opacity",1,bc.options.fadeDuration,d);}else{d();}}else{var d=function(){f.style.display="none";bc.clearOpacity(f);if(e){e();}};if(a){bf(f,"opacity",0,bc.options.fadeDuration,d);}else{d();}}}function aK(i){var a=bc.getCurrent();bN("sb-title-inner").innerHTML=a.title||"";var h,l,e,g,k;if(bc.options.displayNav){h=true;var j=bc.gallery.length;if(j>1){if(bc.options.continuous){l=k=true;}else{l=(j-1)>bc.current;k=bc.current>0;}}if(bc.options.slideshowDelay>0&&bc.hasNext()){g=!bc.isPaused();e=!g;}}else{h=l=e=g=k=false;}aM("close",h);aM("next",l);aM("play",e);aM("pause",g);aM("previous",k);var f="";if(bc.options.displayCounter&&bc.gallery.length>1){var j=bc.gallery.length;if(bc.options.counterType=="skip"){var b=0,c=j,d=parseInt(bc.options.counterLimit)||0;if(d<j&&d>2){var m=Math.floor(d/2);b=bc.current-m;if(b<0){b+=j;}c=bc.current+(d-m);if(c>j){c-=j;}}while(b!=c){if(b==j){b=0;}f+='<a onclick="Shadowbox.change('+b+');"';if(b==bc.current){f+=' class="sb-counter-current"';}f+=">"+(++b)+"</a>";}}else{f=[bc.current+1,bc.lang.of,j].join(" ");}}bN("sb-counter").innerHTML=f;i();}function a9(a){var c=bN("sb-title-inner"),b=bN("sb-info-inner"),d=0.35;c.style.visibility=b.style.visibility="";if(c.innerHTML!=""){bf(c,"marginTop",0,d);}bf(b,"marginTop",0,d,a);}function br(d,g){var i=bN("sb-title"),f=bN("sb-info"),c=i.offsetHeight,b=f.offsetHeight,a=bN("sb-title-inner"),h=bN("sb-info-inner"),e=(d?0.35:0);bf(a,"marginTop",c,e);bf(h,"marginTop",b*-1,e,function(){a.style.visibility=h.style.visibility="hidden";g();});}function bO(c,a,d,e){var f=bN("sb-wrapper-inner"),b=(d?bc.options.resizeDuration:0);bf(a4,"top",a,b);bf(f,"height",c,b,e);}function by(c,a,d,e){var b=(d?bc.options.resizeDuration:0);bf(a4,"left",a,b);bf(a4,"width",c,b,e);}function bG(g,d){var b=bN("sb-body-inner"),g=parseInt(g),d=parseInt(d),e=a4.offsetHeight-b.offsetHeight,f=a4.offsetWidth-b.offsetWidth,i=bM.offsetHeight,h=bM.offsetWidth,a=parseInt(bc.options.viewportPadding)||20,c=(bc.player&&bc.options.handleOversize!="drag");return bc.setDimensions(g,d,i,h,e,f,a,c);}var ba={};ba.markup='<div id="sb-container"><div id="sb-overlay"></div><div id="sb-wrapper"><div id="sb-title"><div id="sb-title-inner"></div></div><div id="sb-wrapper-inner"><div id="sb-body"><div id="sb-body-inner"></div><div id="sb-loading"><div id="sb-loading-inner"><span>{loading}</span></div></div></div></div><div id="sb-info"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="sb-nav-close" title="{close}" onclick="Shadowbox.close()"></a><a id="sb-nav-next" title="{next}" onclick="Shadowbox.next()"></a><a id="sb-nav-play" title="{play}" onclick="Shadowbox.play()"></a><a id="sb-nav-pause" title="{pause}" onclick="Shadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadowbox.previous()"></a></div></div></div></div></div>';ba.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};ba.init=function(){bc.appendHTML(document.body,aL(ba.markup,bc.lang));ba.body=bN("sb-body-inner");bQ=bN("sb-container");bM=bN("sb-overlay");a4=bN("sb-wrapper");if(!aG){bQ.style.position="absolute";}if(!aW){var c,b,d=/url\("(.*\.png)"\)/;bR(aN,function(f,e){c=bN(e);if(c){b=bc.getStyle(c,"backgroundImage").match(d);if(b){c.style.backgroundImage="none";c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+b[1]+",sizingMethod=scale);";}}});}var a;bp(bu,"resize",function(){if(a){clearTimeout(a);a=null;}if(bz){a=setTimeout(ba.onWindowResize,10);}});};ba.onOpen=function(b,a){aR=false;bQ.style.display="block";bV();var c=bG(bc.options.initialHeight,bc.options.initialWidth);bO(c.innerHeight,c.top);by(c.width,c.left);if(bc.options.showOverlay){bM.style.backgroundColor=bc.options.overlayColor;bc.setOpacity(bM,0);if(!bc.options.modal){bp(bM,"click",bc.close);}bC=true;}if(!aG){bS();bp(bu,"scroll",bS);}bl();bQ.style.visibility="visible";if(bC){bf(bM,"opacity",bc.options.overlayOpacity,bc.options.fadeDuration,a);}else{a();}};ba.onLoad=function(b,a){bJ(true);while(ba.body.firstChild){bv(ba.body.firstChild);}br(b,function(){if(!bz){return;}if(!b){a4.style.visibility="visible";}aK(a);});};ba.onReady=function(a){if(!bz){return;}var d=bc.player,c=bG(d.height,d.width);var b=function(){a9(a);};switch(bc.options.animSequence){case"hw":bO(c.innerHeight,c.top,true,function(){by(c.width,c.left,true,b);});break;case"wh":by(c.width,c.left,true,function(){bO(c.innerHeight,c.top,true,b);});break;default:by(c.width,c.left,true);bO(c.innerHeight,c.top,true,b);}};ba.onShow=function(a){bJ(false,a);aR=true;};ba.onClose=function(){if(!aG){bg(bu,"scroll",bS);}bg(bM,"click",bc.close);a4.style.visibility="hidden";var a=function(){bQ.style.visibility="hidden";bQ.style.display="none";bl(true);};if(bC){bf(bM,"opacity",0,bc.options.fadeDuration,a);}else{a();}};ba.onPlay=function(){aM("play",false);aM("pause",true);};ba.onPause=function(){aM("pause",false);aM("play",true);};ba.onWindowResize=function(){if(!aR){return;}bV();var a=bc.player,b=bG(a.height,a.width);by(b.width,b.left);bO(b.innerHeight,b.top);if(a.onWindowResize){a.onWindowResize();}};bc.skin=ba;bu.Shadowbox=bc;})(window);Shadowbox.init({players:["image"]});