/* * Shadowbox.js, version 3.0.3 * http://shadowbox-js.com/ * * Copyright 2007-2010, Michael J. I. Jackson * Date: 2010-08-05 13:20:42 +0000 */ (function(aw,k){var R={version:"3.0.3"};var L=navigator.userAgent.toLowerCase();if(L.indexOf("windows")>-1||L.indexOf("win32")>-1){R.isWindows=true}else{if(L.indexOf("macintosh")>-1||L.indexOf("mac os x")>-1){R.isMac=true}else{if(L.indexOf("linux")>-1){R.isLinux=true}}}R.isIE=L.indexOf("msie")>-1;R.isIE6=L.indexOf("msie 6")>-1;R.isIE7=L.indexOf("msie 7")>-1;R.isGecko=L.indexOf("gecko")>-1&&L.indexOf("safari")==-1;R.isWebKit=L.indexOf("applewebkit/")>-1;var ad=/#(.+)$/,ah=/^(light|shadow)box\[(.*?)\]/i,aB=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,f=/[0-9a-z]+$/i,aG=/(.+\/)shadowbox\.js/i;var A=false,a=false,l={},z=0,T,ar;R.current=-1;R.dimensions=null;R.ease=function(E){return 1+Math.pow(E-1,3)};R.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"}};R.gallery=[];R.onReady=al;R.path=null;R.player=null;R.playerId="sb-player";R.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:al,onClose:al,onFinish:al,onOpen:al,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};R.getCurrent=function(){return R.current>-1?R.gallery[R.current]:null};R.hasNext=function(){return R.gallery.length>1&&(R.current!=R.gallery.length-1||R.options.continuous)};R.isOpen=function(){return A};R.isPaused=function(){return ar=="pause"};R.applyOptions=function(E){l=aE({},R.options);aE(R.options,E)};R.revertOptions=function(){aE(R.options,l)};R.init=function(S,aK){if(a){return}a=true;if(R.skin.options){aE(R.options,R.skin.options)}if(S){aE(R.options,S)}if(!R.path){var aJ,K=document.getElementsByTagName("script");for(var aI=0,E=K.length;aIaR){aT=aR-aN}var S=2*aP+E;if(aK+S>aS){aK=aS-S}var K=(aO-aT)/aO,aQ=(aI-aK)/aI,aL=(K>0||aQ>0);if(aM&&aL){if(K>aQ){aK=Math.round((aI/aO)*aT)}else{if(aQ>K){aT=Math.round((aO/aI)*aK)}}}R.dimensions={height:aT+aJ,width:aK+E,innerHeight:aT,innerWidth:aK,top:Math.floor((aR-(aT+aN))/2+aP),left:Math.floor((aS-(aK+S))/2+aP),oversized:aL};return R.dimensions};R.makeGallery=function(aJ){var E=[],aI=-1;if(typeof aJ=="string"){aJ=[aJ]}if(typeof aJ.length=="number"){aH(aJ,function(aL,aM){if(aM.content){E[aL]=aM}else{E[aL]={content:aM}}});aI=0}else{if(aJ.tagName){var K=R.getCache(aJ);aJ=K?K:R.makeObject(aJ)}if(aJ.gallery){E=[];var aK;for(var S in R.cache){aK=R.cache[S];if(aK.gallery&&aK.gallery==aJ.gallery){if(aI==-1&&aK.content==aJ.content){aI=E.length}E.push(aK)}}if(aI==-1){E.unshift(aJ);aI=0}}else{E=[aJ];aI=0}}aH(E,function(aL,aM){E[aL]=aE({},aM)});return[E,aI]};R.makeObject=function(aI,S){var aJ={content:aI.href,title:aI.getAttribute("title")||"",link:aI};if(S){S=aE({},S);aH(["player","title","height","width","gallery"],function(aK,aL){if(typeof S[aL]!="undefined"){aJ[aL]=S[aL];delete S[aL]}});aJ.options=S}else{aJ.options={}}if(!aJ.player){aJ.player=R.getPlayer(aJ.content)}var E=aI.getAttribute("rel");if(E){var K=E.match(ah);if(K){aJ.gallery=escape(K[2])}aH(E.split(";"),function(aK,aL){K=aL.match(aB);if(K){aJ[K[1]]=K[2]}})}return aJ};R.getPlayer=function(S){if(S.indexOf("#")>-1&&S.indexOf(document.location.href)==0){return"inline"}var aI=S.indexOf("?");if(aI>-1){S=S.substring(0,aI)}var K,E=S.match(f);if(E){K=E[0].toLowerCase()}if(K){if(R.img&&R.img.ext.indexOf(K)>-1){return"img"}if(R.swf&&R.swf.ext.indexOf(K)>-1){return"swf"}if(R.flv&&R.flv.ext.indexOf(K)>-1){return"flv"}if(R.qt&&R.qt.ext.indexOf(K)>-1){if(R.wmp&&R.wmp.ext.indexOf(K)>-1){return"qtwmp"}else{return"qt"}}if(R.wmp&&R.wmp.ext.indexOf(K)>-1){return"wmp"}}return"iframe"};function H(){var aI=R.errorInfo,aJ=R.plugins,aL,aM,aP,S,aO,K,aN,E;for(var aK=0;aK'+s(R.lang.errors[aO],K)+""}else{aM=true}}else{if(aL.player=="inline"){S=ad.exec(aL.content);if(S){aN=af(S[1]);if(aN){aL.content=aN.innerHTML}else{aM=true}}else{aM=true}}else{if(aL.player=="swf"||aL.player=="flv"){E=(aL.options&&aL.options.flashVersion)||R.options.flashVersion;if(R.flash&&!R.flash.hasFlashPlayerVersion(E)){aL.width=310;aL.height=177}}}}if(aM){R.gallery.splice(aK,1);if(aK0?aK-1:aK}}--aK}}}function at(E){if(!R.options.enableKeys){return}(E?G:N)(document,"keydown",ap)}function ap(S){if(S.metaKey||S.shiftKey||S.altKey||S.ctrlKey){return}var K=v(S),E;switch(K){case 81:case 88:case 27:E=R.close;break;case 37:E=R.previous;break;case 39:E=R.next;break;case 32:E=typeof ar=="number"?R.pause:R.play;break}if(E){n(S);E()}}function c(aL){at(false);var aK=R.getCurrent();var S=(aK.player=="inline"?"html":aK.player);if(typeof R[S]!="function"){throw"unknown player "+S}if(aL){R.player.remove();R.revertOptions();R.applyOptions(aK.options||{})}R.player=new R[S](aK,R.playerId);if(R.gallery.length>1){var aI=R.gallery[R.current+1]||R.gallery[0];if(aI.player=="img"){var K=new Image();K.src=aI.content}var aJ=R.gallery[R.current-1]||R.gallery[R.gallery.length-1];if(aJ.player=="img"){var E=new Image();E.src=aJ.content}}R.skin.onLoad(aL,Y)}function Y(){if(!A){return}if(typeof R.player.ready!="undefined"){var E=setInterval(function(){if(A){if(R.player.ready){clearInterval(E);E=null;R.skin.onReady(e)}}else{clearInterval(E);E=null}},10)}else{R.skin.onReady(e)}}function e(){if(!A){return}R.player.append(R.skin.body,R.dimensions);R.skin.onShow(J)}function J(){if(!A){return}if(R.player.onLoad){R.player.onLoad()}R.options.onFinish(R.getCurrent());if(!R.isPaused()){R.play()}at(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(K,S){var E=this.length>>>0;S=S||0;if(S<0){S+=E}for(;S-1;R.plugins={fla:w.indexOf("Shockwave Flash")>-1,qt:w.indexOf("QuickTime")>-1,wmp:!ak&&w.indexOf("Windows Media")>-1,f4m:ak}}else{var p=function(E){var K;try{K=new ActiveXObject(E)}catch(S){}return !!K};R.plugins={fla:p("ShockwaveFlash.ShockwaveFlash"),qt:p("QuickTime.QuickTime"),wmp:p("wmplayer.ocx"),f4m:false}}var Z=/^(light|shadow)box/i,ao="shadowboxCacheKey",b=1;R.cache={};R.select=function(K){var S=[];if(!K){var E;aH(document.getElementsByTagName("a"),function(aK,aL){E=aL.getAttribute("rel");if(E&&Z.test(E)){S.push(aL)}})}else{var aJ=K.length;if(aJ){if(typeof K=="string"){if(R.find){S=R.find(K)}}else{if(aJ==2&&typeof K[0]=="string"&&K[1].nodeType){if(R.find){S=R.find(K[0],K[1])}}else{for(var aI=0;aI+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,aR=0,aT=Object.prototype.toString,aL=false,aK=true;[0,0].sort(function(){aK=false;return 0});var S=function(a2,aX,a5,a6){a5=a5||[];var a8=aX=aX||document;if(aX.nodeType!==1&&aX.nodeType!==9){return[]}if(!a2||typeof a2!=="string"){return a5}var a3=[],aZ,ba,bd,aY,a1=true,a0=aI(aX),a7=a2;while((aQ.exec(""),aZ=aQ.exec(a7))!==null){a7=aZ[3];a3.push(aZ[1]);if(aZ[2]){aY=aZ[3];break}}if(a3.length>1&&aM.exec(a2)){if(a3.length===2&&aN.relative[a3[0]]){ba=aU(a3[0]+a3[1],aX)}else{ba=aN.relative[a3[0]]?[aX]:S(a3.shift(),aX);while(a3.length){a2=a3.shift();if(aN.relative[a2]){a2+=a3.shift()}ba=aU(a2,ba)}}}else{if(!a6&&a3.length>1&&aX.nodeType===9&&!a0&&aN.match.ID.test(a3[0])&&!aN.match.ID.test(a3[a3.length-1])){var a9=S.find(a3.shift(),aX,a0);aX=a9.expr?S.filter(a9.expr,a9.set)[0]:a9.set[0]}if(aX){var a9=a6?{expr:a3.pop(),set:aP(a6)}:S.find(a3.pop(),a3.length===1&&(a3[0]==="~"||a3[0]==="+")&&aX.parentNode?aX.parentNode:aX,a0);ba=a9.expr?S.filter(a9.expr,a9.set):a9.set;if(a3.length>0){bd=aP(ba)}else{a1=false}while(a3.length){var bc=a3.pop(),bb=bc;if(!aN.relative[bc]){bc=""}else{bb=a3.pop()}if(bb==null){bb=aX}aN.relative[bc](bd,bb,a0)}}else{bd=a3=[]}}if(!bd){bd=ba}if(!bd){throw"Syntax error, unrecognized expression: "+(bc||a2)}if(aT.call(bd)==="[object Array]"){if(!a1){a5.push.apply(a5,bd)}else{if(aX&&aX.nodeType===1){for(var a4=0;bd[a4]!=null;a4++){if(bd[a4]&&(bd[a4]===true||bd[a4].nodeType===1&&aO(aX,bd[a4]))){a5.push(ba[a4])}}}else{for(var a4=0;bd[a4]!=null;a4++){if(bd[a4]&&bd[a4].nodeType===1){a5.push(ba[a4])}}}}}else{aP(bd,a5)}if(aY){S(aY,a8,a5,a6);S.uniqueSort(a5)}return a5};S.uniqueSort=function(aY){if(aS){aL=aK;aY.sort(aS);if(aL){for(var aX=1;aX":function(a3,aY){var a1=typeof aY==="string";if(a1&&!/\W/.test(aY)){aY=aY.toLowerCase();for(var aZ=0,aX=a3.length;aZ=0)){if(!aZ){aX.push(a2)}}else{if(aZ){aY[a1]=false}}}}return false},ID:function(aX){return aX[1].replace(/\\/g,"")},TAG:function(aY,aX){return aY[1].toLowerCase()},CHILD:function(aX){if(aX[1]==="nth"){var aY=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(aX[2]==="even"&&"2n"||aX[2]==="odd"&&"2n+1"||!/\D/.test(aX[2])&&"0n+"+aX[2]||aX[2]);aX[2]=(aY[1]+(aY[2]||1))-0;aX[3]=aY[3]-0}aX[0]=aR++;return aX},ATTR:function(a1,aY,aZ,aX,a2,a3){var a0=a1[1].replace(/\\/g,"");if(!a3&&aN.attrMap[a0]){a1[1]=aN.attrMap[a0]}if(a1[2]==="~="){a1[4]=" "+a1[4]+" "}return a1},PSEUDO:function(a1,aY,aZ,aX,a2){if(a1[1]==="not"){if((aQ.exec(a1[3])||"").length>1||/^\w/.test(a1[3])){a1[3]=S(a1[3],null,null,aY)}else{var a0=S.filter(a1[3],aY,aZ,true^a2);if(!aZ){aX.push.apply(aX,a0)}return false}}else{if(aN.match.POS.test(a1[0])||aN.match.CHILD.test(a1[0])){return true}}return a1},POS:function(aX){aX.unshift(true);return aX}},filters:{enabled:function(aX){return aX.disabled===false&&aX.type!=="hidden"},disabled:function(aX){return aX.disabled===true},checked:function(aX){return aX.checked===true},selected:function(aX){aX.parentNode.selectedIndex;return aX.selected===true},parent:function(aX){return !!aX.firstChild},empty:function(aX){return !aX.firstChild},has:function(aZ,aY,aX){return !!S(aX[3],aZ).length},header:function(aX){return/h\d/i.test(aX.nodeName)},text:function(aX){return"text"===aX.type},radio:function(aX){return"radio"===aX.type},checkbox:function(aX){return"checkbox"===aX.type},file:function(aX){return"file"===aX.type},password:function(aX){return"password"===aX.type},submit:function(aX){return"submit"===aX.type},image:function(aX){return"image"===aX.type},reset:function(aX){return"reset"===aX.type},button:function(aX){return"button"===aX.type||aX.nodeName.toLowerCase()==="button"},input:function(aX){return/input|select|textarea|button/i.test(aX.nodeName)}},setFilters:{first:function(aY,aX){return aX===0},last:function(aZ,aY,aX,a0){return aY===a0.length-1},even:function(aY,aX){return aX%2===0},odd:function(aY,aX){return aX%2===1},lt:function(aZ,aY,aX){return aYaX[3]-0},nth:function(aZ,aY,aX){return aX[3]-0===aY},eq:function(aZ,aY,aX){return aX[3]-0===aY}},filter:{PSEUDO:function(a3,aZ,a0,a4){var aY=aZ[1],a1=aN.filters[aY];if(a1){return a1(a3,a0,aZ,a4)}else{if(aY==="contains"){return(a3.textContent||a3.innerText||K([a3])||"").indexOf(aZ[3])>=0}else{if(aY==="not"){var a2=aZ[3];for(var a0=0,aX=a2.length;a0=0)}}},ID:function(aY,aX){return aY.nodeType===1&&aY.getAttribute("id")===aX},TAG:function(aY,aX){return(aX==="*"&&aY.nodeType===1)||aY.nodeName.toLowerCase()===aX},CLASS:function(aY,aX){return(" "+(aY.className||aY.getAttribute("class"))+" ").indexOf(aX)>-1},ATTR:function(a2,a0){var aZ=a0[1],aX=aN.attrHandle[aZ]?aN.attrHandle[aZ](a2):a2[aZ]!=null?a2[aZ]:a2.getAttribute(aZ),a3=aX+"",a1=a0[2],aY=a0[4];return aX==null?a1==="!=":a1==="="?a3===aY:a1==="*="?a3.indexOf(aY)>=0:a1==="~="?(" "+a3+" ").indexOf(aY)>=0:!aY?a3&&aX!==false:a1==="!="?a3!==aY:a1==="^="?a3.indexOf(aY)===0:a1==="$="?a3.substr(a3.length-aY.length)===aY:a1==="|="?a3===aY||a3.substr(0,aY.length+1)===aY+"-":false},POS:function(a1,aY,aZ,a2){var aX=aY[2],a0=aN.setFilters[aX];if(a0){return a0(a1,aZ,aY,a2)}}}};var aM=aN.match.POS;for(var aJ in aN.match){aN.match[aJ]=new RegExp(aN.match[aJ].source+/(?![^\[]*\])(?![^\(]*\))/.source);aN.leftMatch[aJ]=new RegExp(/(^(?:.|\r|\n)*?)/.source+aN.match[aJ].source)}var aP=function(aY,aX){aY=Array.prototype.slice.call(aY,0);if(aX){aX.push.apply(aX,aY);return aX}return aY};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(aW){aP=function(a1,a0){var aY=a0||[];if(aT.call(a1)==="[object Array]"){Array.prototype.push.apply(aY,a1)}else{if(typeof a1.length==="number"){for(var aZ=0,aX=a1.length;aZ";var aX=document.documentElement;aX.insertBefore(aY,aX.firstChild);if(document.getElementById(aZ)){aN.find.ID=function(a1,a2,a3){if(typeof a2.getElementById!=="undefined"&&!a3){var a0=a2.getElementById(a1[1]);return a0?a0.id===a1[1]||typeof a0.getAttributeNode!=="undefined"&&a0.getAttributeNode("id").nodeValue===a1[1]?[a0]:k:[]}};aN.filter.ID=function(a2,a0){var a1=typeof a2.getAttributeNode!=="undefined"&&a2.getAttributeNode("id");return a2.nodeType===1&&a1&&a1.nodeValue===a0}}aX.removeChild(aY);aX=aY=null})();(function(){var aX=document.createElement("div");aX.appendChild(document.createComment(""));if(aX.getElementsByTagName("*").length>0){aN.find.TAG=function(aY,a2){var a1=a2.getElementsByTagName(aY[1]);if(aY[1]==="*"){var a0=[];for(var aZ=0;a1[aZ];aZ++){if(a1[aZ].nodeType===1){a0.push(a1[aZ])}}a1=a0}return a1}}aX.innerHTML="";if(aX.firstChild&&typeof aX.firstChild.getAttribute!=="undefined"&&aX.firstChild.getAttribute("href")!=="#"){aN.attrHandle.href=function(aY){return aY.getAttribute("href",2)}}aX=null})();if(document.querySelectorAll){(function(){var aX=S,aZ=document.createElement("div");aZ.innerHTML="

";if(aZ.querySelectorAll&&aZ.querySelectorAll(".TEST").length===0){return}S=function(a3,a2,a0,a1){a2=a2||document;if(!a1&&a2.nodeType===9&&!aI(a2)){try{return aP(a2.querySelectorAll(a3),a0)}catch(a4){}}return aX(a3,a2,a0,a1)};for(var aY in aX){S[aY]=aX[aY]}aZ=null})()}(function(){var aX=document.createElement("div");aX.innerHTML="
";if(!aX.getElementsByClassName||aX.getElementsByClassName("e").length===0){return}aX.lastChild.className="e";if(aX.getElementsByClassName("e").length===1){return}aN.order.splice(1,0,"CLASS");aN.find.CLASS=function(aY,aZ,a0){if(typeof aZ.getElementsByClassName!=="undefined"&&!a0){return aZ.getElementsByClassName(aY[1])}};aX=null})();function E(aY,a3,a2,a6,a4,a5){for(var a0=0,aZ=a6.length;a00){a1=aX;break}}}aX=aX[aY]}a6[a0]=a1}}}var aO=document.compareDocumentPosition?function(aY,aX){return aY.compareDocumentPosition(aX)&16}:function(aY,aX){return aY!==aX&&(aY.contains?aY.contains(aX):true)};var aI=function(aX){var aY=(aX?aX.ownerDocument||aX:0).documentElement;return aY?aY.nodeName!=="HTML":false};var aU=function(aX,a4){var a0=[],a1="",a2,aZ=a4.nodeType?[a4]:a4;while((a2=aN.match.PSEUDO.exec(aX))){a1+=a2[0];aX=aX.replace(aN.match.PSEUDO,"")}aX=aN.relative[aX]?aX+"*":aX;for(var a3=0,aY=aZ.length;a3{1} pour afficher ce contenu.',shared:'Vous devez installer les plugins {1} et {3} pour afficher ce contenu.',either:'Vous devez installer le plugin {1} ou {3} pour afficher ce contenu.'}};var D,av="sb-drag-proxy",F,j,ai;function az(){F={x:0,y:0,startX:null,startY:null}}function aC(){var E=R.dimensions;aE(j.style,{height:E.innerHeight+"px",width:E.innerWidth+"px"})}function P(){az();var E=["position:absolute","cursor:"+(R.isGecko?"-moz-grab":"move"),"background-color:"+(R.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");R.appendHTML(R.skin.body,'
');j=af(av);aC();G(j,"mousedown",M)}function B(){if(j){N(j,"mousedown",M);C(j);j=null}ai=null}function M(K){n(K);var E=X(K);F.startX=E[0];F.startY=E[1];ai=af(R.player.id);G(document,"mousemove",I);G(document,"mouseup",i);if(R.isGecko){j.style.cursor="-moz-grabbing"}}function I(aJ){var E=R.player,aK=R.dimensions,aI=X(aJ);var S=aI[0]-F.startX;F.startX+=S;F.x=Math.max(Math.min(0,F.x+S),aK.innerWidth-E.width);var K=aI[1]-F.startY;F.startY+=K;F.y=Math.max(Math.min(0,F.y+K),aK.innerHeight-E.height);aE(ai.style,{left:F.x+"px",top:F.y+"px"})}function i(){N(document,"mousemove",I);N(document,"mouseup",i);if(R.isGecko){j.style.cursor="-moz-grab"}}R.img=function(K,S){this.obj=K;this.id=S;this.ready=false;var E=this;D=new Image();D.onload=function(){E.height=K.height?parseInt(K.height,10):D.height;E.width=K.width?parseInt(K.width,10):D.width;E.ready=true;D.onload=null;D=null};D.src=K.content};R.img.ext=["bmp","gif","jpg","jpeg","png"];R.img.prototype={append:function(K,aJ){var S=document.createElement("img");S.id=this.id;S.src=this.obj.content;S.style.position="absolute";var E,aI;if(aJ.oversized&&R.options.handleOversize=="resize"){E=aJ.innerHeight;aI=aJ.innerWidth}else{E=this.height;aI=this.width}S.setAttribute("height",E);S.setAttribute("width",aI);K.appendChild(S)},remove:function(){var E=af(this.id);if(E){C(E)}B();if(D){D.onload=null;D=null}},onLoad:function(){var E=R.dimensions;if(E.oversized&&R.options.handleOversize=="drag"){P()}},onWindowResize:function(){var aI=R.dimensions;switch(R.options.handleOversize){case"resize":var E=af(this.id);E.height=aI.innerHeight;E.width=aI.innerWidth;break;case"drag":if(ai){var S=parseInt(R.getStyle(ai,"top")),K=parseInt(R.getStyle(ai,"left"));if(S+this.height=aK){clearInterval(K);K=null;aN(S,aO);if(aS){aS()}}else{aN(S,aP+aL((aJ-aI)/aM)*aQ)}},10)}function aD(){ac.style.height=R.getWindowSize("Height")+"px";ac.style.width=R.getWindowSize("Width")+"px"}function aF(){ac.style.top=document.documentElement.scrollTop+"px";ac.style.left=document.documentElement.scrollLeft+"px"}function aA(E){if(E){aH(aa,function(K,S){S[0].style.visibility=S[1]||""})}else{aa=[];aH(R.options.troubleElements,function(S,K){aH(document.getElementsByTagName(K),function(aI,aJ){aa.push([aJ,aJ.style.visibility]);aJ.style.visibility="hidden"})})}}function r(S,E){var K=af("sb-nav-"+S);if(K){K.style.display=E?"":"none"}}function aj(E,aK){var aJ=af("sb-loading"),S=R.getCurrent().player,aI=(S=="img"||S=="html");if(E){R.setOpacity(aJ,0);aJ.style.display="block";var K=function(){R.clearOpacity(aJ);if(aK){aK()}};if(aI){O(aJ,"opacity",1,R.options.fadeDuration,K)}else{K()}}else{var K=function(){aJ.style.display="none";R.clearOpacity(aJ);if(aK){aK()}};if(aI){O(aJ,"opacity",0,R.options.fadeDuration,K)}else{K()}}}function t(aP){var aK=R.getCurrent();af("sb-title-inner").innerHTML=aK.title||"";var aQ,aM,K,aR,aN;if(R.options.displayNav){aQ=true;var aO=R.gallery.length;if(aO>1){if(R.options.continuous){aM=aN=true}else{aM=(aO-1)>R.current;aN=R.current>0}}if(R.options.slideshowDelay>0&&R.hasNext()){aR=!R.isPaused();K=!aR}}else{aQ=aM=K=aR=aN=false}r("close",aQ);r("next",aM);r("play",K);r("pause",aR);r("previous",aN);var E="";if(R.options.displayCounter&&R.gallery.length>1){var aO=R.gallery.length;if(R.options.counterType=="skip"){var aJ=0,aI=aO,S=parseInt(R.options.counterLimit)||0;if(S2){var aL=Math.floor(S/2);aJ=R.current-aL;if(aJ<0){aJ+=aO}aI=R.current+(S-aL);if(aI>aO){aI-=aO}}while(aJ!=aI){if(aJ==aO){aJ=0}E+='"}}else{E=[R.current+1,R.lang.of,aO].join(" ")}}af("sb-counter").innerHTML=E;aP()}function V(aI){var E=af("sb-title-inner"),S=af("sb-info-inner"),K=0.35;E.style.visibility=S.style.visibility="";if(E.innerHTML!=""){O(E,"marginTop",0,K)}O(S,"marginTop",0,K,aI)}function ax(S,aN){var aL=af("sb-title"),E=af("sb-info"),aI=aL.offsetHeight,aJ=E.offsetHeight,aK=af("sb-title-inner"),aM=af("sb-info-inner"),K=(S?0.35:0);O(aK,"marginTop",aI,K);O(aM,"marginTop",aJ*-1,K,function(){aK.style.visibility=aM.style.visibility="hidden";aN()})}function ae(E,aI,K,aK){var aJ=af("sb-wrapper-inner"),S=(K?R.options.resizeDuration:0);O(ab,"top",aI,S);O(aJ,"height",E,S,aK)}function au(E,aI,K,aJ){var S=(K?R.options.resizeDuration:0);O(ab,"left",aI,S);O(ab,"width",E,S,aJ)}function am(aN,S){var aJ=af("sb-body-inner"),aN=parseInt(aN),S=parseInt(S),K=ab.offsetHeight-aJ.offsetHeight,E=ab.offsetWidth-aJ.offsetWidth,aL=ag.offsetHeight,aM=ag.offsetWidth,aK=parseInt(R.options.viewportPadding)||20,aI=(R.player&&R.options.handleOversize!="drag");return R.setDimensions(aN,S,aL,aM,K,E,aK,aI)}var U={};U.markup='';U.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"]};U.init=function(){R.appendHTML(document.body,s(U.markup,R.lang));U.body=af("sb-body-inner");ac=af("sb-container");ag=af("sb-overlay");ab=af("sb-wrapper");if(!x){ac.style.position="absolute"}if(!h){var S,E,K=/url\("(.*\.png)"\)/;aH(q,function(aJ,aK){S=af(aK);if(S){E=R.getStyle(S,"backgroundImage").match(K);if(E){S.style.backgroundImage="none";S.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+E[1]+",sizingMethod=scale);"}}})}var aI;G(aw,"resize",function(){if(aI){clearTimeout(aI);aI=null}if(A){aI=setTimeout(U.onWindowResize,10)}})};U.onOpen=function(E,S){m=false;ac.style.display="block";aD();var K=am(R.options.initialHeight,R.options.initialWidth);ae(K.innerHeight,K.top);au(K.width,K.left);if(R.options.showOverlay){ag.style.backgroundColor=R.options.overlayColor;R.setOpacity(ag,0);if(!R.options.modal){G(ag,"click",R.close)}aq=true}if(!x){aF();G(aw,"scroll",aF)}aA();ac.style.visibility="visible";if(aq){O(ag,"opacity",R.options.overlayOpacity,R.options.fadeDuration,S)}else{S()}};U.onLoad=function(K,E){aj(true);while(U.body.firstChild){C(U.body.firstChild)}ax(K,function(){if(!A){return}if(!K){ab.style.visibility="visible"}t(E)})};U.onReady=function(aI){if(!A){return}var K=R.player,S=am(K.height,K.width);var E=function(){V(aI)};switch(R.options.animSequence){case"hw":ae(S.innerHeight,S.top,true,function(){au(S.width,S.left,true,E)});break;case"wh":au(S.width,S.left,true,function(){ae(S.innerHeight,S.top,true,E)});break;default:au(S.width,S.left,true);ae(S.innerHeight,S.top,true,E)}};U.onShow=function(E){aj(false,E);m=true};U.onClose=function(){if(!x){N(aw,"scroll",aF)}N(ag,"click",R.close);ab.style.visibility="hidden";var E=function(){ac.style.visibility="hidden";ac.style.display="none";aA(true)};if(aq){O(ag,"opacity",0,R.options.fadeDuration,E)}else{E()}};U.onPlay=function(){r("play",false);r("pause",true)};U.onPause=function(){r("pause",false);r("play",true)};U.onWindowResize=function(){if(!m){return}aD();var E=R.player,K=am(E.height,E.width);au(K.width,K.left);ae(K.innerHeight,K.top);if(E.onWindowResize){E.onWindowResize()}};R.skin=U;aw.Shadowbox=R})(window);