You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
35 KiB
18 lines
35 KiB
/*
|
|
* Shadowbox.js, version 3.0.3
|
|
* http://shadowbox-js.com/
|
|
*
|
|
* Copyright 2007-2010, Michael J. I. Jackson
|
|
* Date: 2011-07-05 17:19:53 +0000
|
|
*/
|
|
|
|
(function(T,p){var g={version:"3.0.3"};var Y=navigator.userAgent.toLowerCase();if(Y.indexOf("windows")>-1||Y.indexOf("win32")>-1){g.isWindows=true}else{if(Y.indexOf("macintosh")>-1||Y.indexOf("mac os x")>-1){g.isMac=true}else{if(Y.indexOf("linux")>-1){g.isLinux=true}}}g.isIE=Y.indexOf("msie")>-1;g.isIE6=Y.indexOf("msie 6")>-1;g.isIE7=Y.indexOf("msie 7")>-1;g.isGecko=Y.indexOf("gecko")>-1&&Y.indexOf("safari")==-1;g.isWebKit=Y.indexOf("applewebkit/")>-1;var e=/#(.+)$/,M=/^(light|shadow)box\[(.*?)\]/i,o=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,ar=/[0-9a-z]+$/i,ap=/(.+\/)shadowbox\.js/i;var w=false,m=false,V={},ai=0,O,aa;g.current=-1;g.dimensions=null;g.ease=function(K){return 1+Math.pow(K-1,3)};g.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"}};g.gallery=[];g.onReady=aj;g.path=null;g.player=null;g.playerId="sb-player";g.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"none",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:aj,onClose:aj,onFinish:aj,onOpen:aj,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};g.getCurrent=function(){return g.current>-1?g.gallery[g.current]:null};g.hasNext=function(){return g.gallery.length>1&&(g.current!=g.gallery.length-1||g.options.continuous)};g.isOpen=function(){return w};g.isPaused=function(){return aa=="pause"};g.applyOptions=function(K){V=ao({},g.options);ao(g.options,K)};g.revertOptions=function(){ao(g.options,V)};g.init=function(au,ax){if(m){return}m=true;if(g.skin.options){ao(g.options,g.skin.options)}if(au){ao(g.options,au)}if(!g.path){var aw,S=document.getElementsByTagName("script");for(var av=0,K=S.length;av<K;++av){aw=ap.exec(S[av].src);if(aw){g.path=aw[1];break}}}if(ax){g.onReady=ax}aq()};g.open=function(S){if(w){return}var K=g.makeGallery(S);g.gallery=K[0];g.current=K[1];S=g.getCurrent();if(S==null){return}g.applyOptions(S.options||{});f();if(g.gallery.length){S=g.getCurrent();if(g.options.onOpen(S)===false){return}w=true;g.skin.onOpen(S,U)}};g.close=function(){if(!w){return}w=false;if(g.player){g.player.remove();g.player=null}if(typeof aa=="number"){clearTimeout(aa);aa=null}ai=0;af(false);g.options.onClose(g.getCurrent());g.skin.onClose();g.revertOptions()};g.play=function(){if(!g.hasNext()){return}if(!ai){ai=g.options.slideshowDelay*1000}if(ai){O=X();aa=setTimeout(function(){ai=O=0;g.next()},ai);if(g.skin.onPlay){g.skin.onPlay()}}};g.pause=function(){if(typeof aa!="number"){return}ai=Math.max(0,ai-(X()-O));if(ai){clearTimeout(aa);aa="pause";if(g.skin.onPause){g.skin.onPause()}}};g.change=function(K){if(!(K in g.gallery)){if(g.options.continuous){K=(K<0?g.gallery.length+K:0);if(!(K in g.gallery)){return}}else{return}}g.current=K;if(typeof aa=="number"){clearTimeout(aa);aa=null;ai=O=0}g.options.onChange(g.getCurrent());U(true)};g.next=function(){g.change(g.current+1)};g.previous=function(){g.change(g.current-1)};g.setDimensions=function(aG,ax,aE,aF,aw,K,aC,az){var aB=aG,av=ax;var aA=2*aC+aw;if(aG+aA>aE){aG=aE-aA}var au=2*aC+K;if(ax+au>aF){ax=aF-au}var S=(aB-aG)/aB,aD=(av-ax)/av,ay=(S>0||aD>0);if(az&&ay){if(S>aD){ax=Math.round((av/aB)*aG)}else{if(aD>S){aG=Math.round((aB/av)*ax)}}}g.dimensions={height:aG+aw,width:ax+K,innerHeight:aG,innerWidth:ax,top:Math.floor((aE-(aG+aA))/2+aC),left:Math.floor((aF-(ax+au))/2+aC),oversized:ay};return g.dimensions};g.makeGallery=function(aw){var K=[],av=-1;if(typeof aw=="string"){aw=[aw]}if(typeof aw.length=="number"){ac(aw,function(ay,az){if(az.content){K[ay]=az}else{K[ay]={content:az}}});av=0}else{if(aw.tagName){var S=g.getCache(aw);aw=S?S:g.makeObject(aw)}if(aw.gallery){K=[];var ax;for(var au in g.cache){ax=g.cache[au];if(ax.gallery&&ax.gallery==aw.gallery){if(av==-1&&ax.content==aw.content){av=K.length}K.push(ax)}}if(av==-1){K.unshift(aw);av=0}}else{K=[aw];av=0}}ac(K,function(ay,az){K[ay]=ao({},az)});return[K,av]};g.makeObject=function(av,au){var aw={content:av.href,title:av.getAttribute("title")||"",link:av};if(au){au=ao({},au);ac(["player","title","height","width","gallery"],function(ax,ay){if(typeof au[ay]!="undefined"){aw[ay]=au[ay];delete au[ay]}});aw.options=au}else{aw.options={}}if(!aw.player){aw.player=g.getPlayer(aw.content)}var K=av.getAttribute("rel");if(K){var S=K.match(M);if(S){aw.gallery=escape(S[2])}ac(K.split(";"),function(ax,ay){S=ay.match(o);if(S){aw[S[1]]=S[2]}})}return aw};g.getPlayer=function(au){if(au.indexOf("#")>-1&&au.indexOf(document.location.href)==0){return"inline"}var av=au.indexOf("?");if(av>-1){au=au.substring(0,av)}var S,K=au.match(ar);if(K){S=K[0].toLowerCase()}if(S){if(g.img&&g.img.ext.indexOf(S)>-1){return"img"}if(g.swf&&g.swf.ext.indexOf(S)>-1){return"swf"}if(g.flv&&g.flv.ext.indexOf(S)>-1){return"flv"}if(g.qt&&g.qt.ext.indexOf(S)>-1){if(g.wmp&&g.wmp.ext.indexOf(S)>-1){return"qtwmp"}else{return"qt"}}if(g.wmp&&g.wmp.ext.indexOf(S)>-1){return"wmp"}}return"iframe"};function f(){var av=g.errorInfo,aw=g.plugins,ay,az,aC,au,aB,S,aA,K;for(var ax=0;ax<g.gallery.length;++ax){ay=g.gallery[ax];az=false;aC=null;switch(ay.player){case"flv":case"swf":if(!aw.fla){aC="fla"}break;case"qt":if(!aw.qt){aC="qt"}break;case"wmp":if(g.isMac){if(aw.qt&&aw.f4m){ay.player="qt"}else{aC="qtf4m"}}else{if(!aw.wmp){aC="wmp"}}break;case"qtwmp":if(aw.qt){ay.player="qt"}else{if(aw.wmp){ay.player="wmp"}else{aC="qtwmp"}}break}if(aC){if(g.options.handleUnsupported=="link"){switch(aC){case"qtf4m":aB="shared";S=[av.qt.url,av.qt.name,av.f4m.url,av.f4m.name];break;case"qtwmp":aB="either";S=[av.qt.url,av.qt.name,av.wmp.url,av.wmp.name];break;default:aB="single";S=[av[aC].url,av[aC].name]}ay.player="html";ay.content='<div class="sb-message">'+s(g.lang.errors[aB],S)+"</div>"}else{az=true}}else{if(ay.player=="inline"){au=e.exec(ay.content);if(au){aA=ag(au[1]);if(aA){ay.content=aA.innerHTML}else{az=true}}else{az=true}}else{if(ay.player=="swf"||ay.player=="flv"){K=(ay.options&&ay.options.flashVersion)||g.options.flashVersion;if(g.flash&&!g.flash.hasFlashPlayerVersion(K)){ay.width=310;ay.height=177}}}}if(az){g.gallery.splice(ax,1);if(ax<g.current){--g.current}else{if(ax==g.current){g.current=ax>0?ax-1:ax}}--ax}}}function af(K){if(!g.options.enableKeys){return}(K?j:a)(document,"keydown",W)}function W(au){if(au.metaKey||au.shiftKey||au.altKey||au.ctrlKey){return}var S=l(au),K;switch(S){case 81:case 88:case 27:K=g.close;break;case 37:K=g.previous;break;case 39:K=g.next;break;case 32:K=typeof aa=="number"?g.pause:g.play;break}if(K){G(au);K()}}function U(ay){af(false);var ax=g.getCurrent();var au=(ax.player=="inline"?"html":ax.player);if(typeof g[au]!="function"){throw"unknown player "+au}if(ay){g.player.remove();g.revertOptions();g.applyOptions(ax.options||{})}g.player=new g[au](ax,g.playerId);if(g.gallery.length>1){var av=g.gallery[g.current+1]||g.gallery[0];if(av.player=="img"){var S=new Image();S.src=av.content}var aw=g.gallery[g.current-1]||g.gallery[g.gallery.length-1];if(aw.player=="img"){var K=new Image();K.src=aw.content}}g.skin.onLoad(ay,r)}function r(){if(!w){return}if(typeof g.player.ready!="undefined"){var K=setInterval(function(){if(w){if(g.player.ready){clearInterval(K);K=null;g.skin.onReady(J)}}else{clearInterval(K);K=null}},10)}else{g.skin.onReady(J)}}function J(){if(!w){return}g.player.append(g.skin.body,g.dimensions);g.skin.onShow(q)}function q(){if(!w){return}if(g.player.onLoad){g.player.onLoad()}g.options.onFinish(g.getCurrent());if(!g.isPaused()){g.play()}af(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(S,au){var K=this.length>>>0;au=au||0;if(au<0){au+=K}for(;au<K;++au){if(au in this&&this[au]===S){return au}}return -1}}function X(){return(new Date).getTime()}function ao(K,au){for(var S in au){K[S]=au[S]}return K}function ac(av,aw){var S=0,K=av.length;for(var au=av[0];S<K&&aw.call(au,S,au)!==false;au=av[++S]){}}function s(S,K){return S.replace(/\{(\w+?)\}/g,function(au,av){return K[av]})}function aj(){}function ag(K){return document.getElementById(K)}function z(K){K.parentNode.removeChild(K)}var ak=true,L=true;function an(){var K=document.body,S=document.createElement("div");ak=typeof S.style.opacity==="string";S.style.position="fixed";S.style.margin=0;S.style.top="20px";K.appendChild(S,K.firstChild);L=S.offsetTop==20;K.removeChild(S)}g.getStyle=(function(){var K=/opacity=([^)]*)/,S=document.defaultView&&document.defaultView.getComputedStyle;return function(ax,aw){var av;if(!ak&&aw=="opacity"&&ax.currentStyle){av=K.test(ax.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return av===""?"1":av}if(S){var au=S(ax,null);if(au){av=au[aw]}if(aw=="opacity"&&av==""){av="1"}}else{av=ax.currentStyle[aw]}return av}})();g.appendHTML=function(au,S){if(au.insertAdjacentHTML){au.insertAdjacentHTML("BeforeEnd",S)}else{if(au.lastChild){var K=au.ownerDocument.createRange();K.setStartAfter(au.lastChild);var av=K.createContextualFragment(S);au.appendChild(av)}else{au.innerHTML=S}}};g.getWindowSize=function(K){if(document.compatMode==="CSS1Compat"){return document.documentElement["client"+K]}return document.body["client"+K]};g.setOpacity=function(au,K){var S=au.style;if(ak){S.opacity=(K==1?"":K)}else{S.zoom=1;if(K==1){if(typeof S.filter=="string"&&(/alpha/i).test(S.filter)){S.filter=S.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"")}}else{S.filter=(S.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(K*100)+")"}}};g.clearOpacity=function(K){g.setOpacity(K,1)};function C(S){var K=S.target?S.target:S.srcElement;return K.nodeType==3?K.parentNode:K}function Q(S){var K=S.pageX||(S.clientX+(document.documentElement.scrollLeft||document.body.scrollLeft)),au=S.pageY||(S.clientY+(document.documentElement.scrollTop||document.body.scrollTop));return[K,au]}function G(K){K.preventDefault()}function l(K){return K.which?K.which:K.keyCode}function j(av,au,S){if(av.addEventListener){av.addEventListener(au,S,false)}else{if(av.nodeType===3||av.nodeType===8){return}if(av.setInterval&&(av!==T&&!av.frameElement)){av=T}if(!S.__guid){S.__guid=j.guid++}if(!av.events){av.events={}}var K=av.events[au];if(!K){K=av.events[au]={};if(av["on"+au]){K[0]=av["on"+au]}}K[S.__guid]=S;av["on"+au]=j.handleEvent}}j.guid=1;j.handleEvent=function(av){var K=true;av=av||j.fixEvent(((this.ownerDocument||this.document||this).parentWindow||T).event);var S=this.events[av.type];for(var au in S){this.__handleEvent=S[au];if(this.__handleEvent(av)===false){K=false}}return K};j.preventDefault=function(){this.returnValue=false};j.stopPropagation=function(){this.cancelBubble=true};j.fixEvent=function(K){K.preventDefault=j.preventDefault;K.stopPropagation=j.stopPropagation;return K};function a(au,S,K){if(au.removeEventListener){au.removeEventListener(S,K,false)}else{if(au.events&&au.events[S]){delete au.events[S][K.__guid]}}}var D=false,N;if(document.addEventListener){N=function(){document.removeEventListener("DOMContentLoaded",N,false);g.load()}}else{if(document.attachEvent){N=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",N);g.load()}}}}function i(){if(D){return}try{document.documentElement.doScroll("left")}catch(K){setTimeout(i,1);return}g.load()}function aq(){if(document.readyState==="complete"){return g.load()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",N,false);T.addEventListener("load",g.load,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",N);T.attachEvent("onload",g.load);var K=false;try{K=T.frameElement===null}catch(S){}if(document.documentElement.doScroll&&K){i()}}}}g.load=function(){if(D){return}if(!document.body){return setTimeout(g.load,13)}D=true;an();g.onReady();if(!g.options.skipSetup){g.setup()}g.skin.init()};g.plugins={};if(navigator.plugins&&navigator.plugins.length){var am=[];ac(navigator.plugins,function(K,S){am.push(S.name)});am=am.join(",");var d=am.indexOf("Flip4Mac")>-1;g.plugins={fla:am.indexOf("Shockwave Flash")>-1,qt:am.indexOf("QuickTime")>-1,wmp:!d&&am.indexOf("Windows Media")>-1,f4m:d}}else{var B=function(K){var S;try{S=new ActiveXObject(K)}catch(au){}return !!S};g.plugins={fla:B("ShockwaveFlash.ShockwaveFlash"),qt:B("QuickTime.QuickTime"),wmp:B("wmplayer.ocx"),f4m:false}}var c=/^(light|shadow)box/i,Z="shadowboxCacheKey",h=1;g.cache={};g.select=function(S){var au=[];if(!S){var K;ac(document.getElementsByTagName("a"),function(ax,ay){K=ay.getAttribute("rel");if(K&&c.test(K)){au.push(ay)}})}else{var aw=S.length;if(aw){if(typeof S=="string"){if(g.find){au=g.find(S)}}else{if(aw==2&&typeof S[0]=="string"&&S[1].nodeType){if(g.find){au=g.find(S[0],S[1])}}else{for(var av=0;av<aw;++av){au[av]=S[av]}}}}else{au.push(S)}}return au};g.setup=function(K,S){ac(g.select(K),function(au,av){g.addCache(av,S)})};g.teardown=function(K){ac(g.select(K),function(S,au){g.removeCache(au)})};g.addCache=function(au,K){var S=au[Z];if(S==p){S=h++;au[Z]=S;j(au,"click",b)}g.cache[S]=g.makeObject(au,K)};g.removeCache=function(K){a(K,"click",b);delete g.cache[K[Z]];K[Z]=null};g.getCache=function(S){var K=S[Z];return(K in g.cache&&g.cache[K])};g.clearCache=function(){for(var K in g.cache){g.removeCache(g.cache[K].link)}g.cache={}};function b(K){g.open(this);if(g.gallery.length){G(K)}}
|
|
/*
|
|
* Sizzle CSS Selector Engine - v1.0
|
|
* Copyright 2009, The Dojo Foundation
|
|
* Released under the MIT, BSD, and GPL Licenses.
|
|
* More information: http://sizzlejs.com/
|
|
*
|
|
* Modified for inclusion in Shadowbox.js
|
|
*/
|
|
g.find=(function(){var aD=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,aE=0,aG=Object.prototype.toString,ay=false,ax=true;[0,0].sort(function(){ax=false;return 0});var au=function(aP,aK,aS,aT){aS=aS||[];var aV=aK=aK||document;if(aK.nodeType!==1&&aK.nodeType!==9){return[]}if(!aP||typeof aP!=="string"){return aS}var aQ=[],aM,aX,a0,aL,aO=true,aN=av(aK),aU=aP;while((aD.exec(""),aM=aD.exec(aU))!==null){aU=aM[3];aQ.push(aM[1]);if(aM[2]){aL=aM[3];break}}if(aQ.length>1&&az.exec(aP)){if(aQ.length===2&&aA.relative[aQ[0]]){aX=aH(aQ[0]+aQ[1],aK)}else{aX=aA.relative[aQ[0]]?[aK]:au(aQ.shift(),aK);while(aQ.length){aP=aQ.shift();if(aA.relative[aP]){aP+=aQ.shift()}aX=aH(aP,aX)}}}else{if(!aT&&aQ.length>1&&aK.nodeType===9&&!aN&&aA.match.ID.test(aQ[0])&&!aA.match.ID.test(aQ[aQ.length-1])){var aW=au.find(aQ.shift(),aK,aN);aK=aW.expr?au.filter(aW.expr,aW.set)[0]:aW.set[0]}if(aK){var aW=aT?{expr:aQ.pop(),set:aC(aT)}:au.find(aQ.pop(),aQ.length===1&&(aQ[0]==="~"||aQ[0]==="+")&&aK.parentNode?aK.parentNode:aK,aN);aX=aW.expr?au.filter(aW.expr,aW.set):aW.set;if(aQ.length>0){a0=aC(aX)}else{aO=false}while(aQ.length){var aZ=aQ.pop(),aY=aZ;if(!aA.relative[aZ]){aZ=""}else{aY=aQ.pop()}if(aY==null){aY=aK}aA.relative[aZ](a0,aY,aN)}}else{a0=aQ=[]}}if(!a0){a0=aX}if(!a0){throw"Syntax error, unrecognized expression: "+(aZ||aP)}if(aG.call(a0)==="[object Array]"){if(!aO){aS.push.apply(aS,a0)}else{if(aK&&aK.nodeType===1){for(var aR=0;a0[aR]!=null;aR++){if(a0[aR]&&(a0[aR]===true||a0[aR].nodeType===1&&aB(aK,a0[aR]))){aS.push(aX[aR])}}}else{for(var aR=0;a0[aR]!=null;aR++){if(a0[aR]&&a0[aR].nodeType===1){aS.push(aX[aR])}}}}}else{aC(a0,aS)}if(aL){au(aL,aV,aS,aT);au.uniqueSort(aS)}return aS};au.uniqueSort=function(aL){if(aF){ay=ax;aL.sort(aF);if(ay){for(var aK=1;aK<aL.length;aK++){if(aL[aK]===aL[aK-1]){aL.splice(aK--,1)}}}}return aL};au.matches=function(aK,aL){return au(aK,null,null,aL)};au.find=function(aR,aK,aS){var aQ,aO;if(!aR){return[]}for(var aN=0,aM=aA.order.length;aN<aM;aN++){var aP=aA.order[aN],aO;if((aO=aA.leftMatch[aP].exec(aR))){var aL=aO[1];aO.splice(1,1);if(aL.substr(aL.length-1)!=="\\"){aO[1]=(aO[1]||"").replace(/\\/g,"");aQ=aA.find[aP](aO,aK,aS);if(aQ!=null){aR=aR.replace(aA.match[aP],"");break}}}}if(!aQ){aQ=aK.getElementsByTagName("*")}return{set:aQ,expr:aR}};au.filter=function(aU,aT,aX,aN){var aM=aU,aZ=[],aR=aT,aP,aK,aQ=aT&&aT[0]&&av(aT[0]);while(aU&&aT.length){for(var aS in aA.filter){if((aP=aA.match[aS].exec(aU))!=null){var aL=aA.filter[aS],aY,aW;aK=false;if(aR===aZ){aZ=[]}if(aA.preFilter[aS]){aP=aA.preFilter[aS](aP,aR,aX,aZ,aN,aQ);if(!aP){aK=aY=true}else{if(aP===true){continue}}}if(aP){for(var aO=0;(aW=aR[aO])!=null;aO++){if(aW){aY=aL(aW,aP,aO,aR);var aV=aN^!!aY;if(aX&&aY!=null){if(aV){aK=true}else{aR[aO]=false}}else{if(aV){aZ.push(aW);aK=true}}}}}if(aY!==p){if(!aX){aR=aZ}aU=aU.replace(aA.match[aS],"");if(!aK){return[]}break}}}if(aU===aM){if(aK==null){throw"Syntax error, unrecognized expression: "+aU}else{break}}aM=aU}return aR};var aA=au.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(aK){return aK.getAttribute("href")}},relative:{"+":function(aQ,aL){var aN=typeof aL==="string",aP=aN&&!/\W/.test(aL),aR=aN&&!aP;if(aP){aL=aL.toLowerCase()}for(var aM=0,aK=aQ.length,aO;aM<aK;aM++){if((aO=aQ[aM])){while((aO=aO.previousSibling)&&aO.nodeType!==1){}aQ[aM]=aR||aO&&aO.nodeName.toLowerCase()===aL?aO||false:aO===aL}}if(aR){au.filter(aL,aQ,true)}},">":function(aQ,aL){var aO=typeof aL==="string";if(aO&&!/\W/.test(aL)){aL=aL.toLowerCase();for(var aM=0,aK=aQ.length;aM<aK;aM++){var aP=aQ[aM];if(aP){var aN=aP.parentNode;aQ[aM]=aN.nodeName.toLowerCase()===aL?aN:false}}}else{for(var aM=0,aK=aQ.length;aM<aK;aM++){var aP=aQ[aM];if(aP){aQ[aM]=aO?aP.parentNode:aP.parentNode===aL}}if(aO){au.filter(aL,aQ,true)}}},"":function(aN,aL,aP){var aM=aE++,aK=aI;if(typeof aL==="string"&&!/\W/.test(aL)){var aO=aL=aL.toLowerCase();aK=K}aK("parentNode",aL,aM,aN,aO,aP)},"~":function(aN,aL,aP){var aM=aE++,aK=aI;if(typeof aL==="string"&&!/\W/.test(aL)){var aO=aL=aL.toLowerCase();aK=K}aK("previousSibling",aL,aM,aN,aO,aP)}},find:{ID:function(aL,aM,aN){if(typeof aM.getElementById!=="undefined"&&!aN){var aK=aM.getElementById(aL[1]);return aK?[aK]:[]}},NAME:function(aM,aP){if(typeof aP.getElementsByName!=="undefined"){var aL=[],aO=aP.getElementsByName(aM[1]);for(var aN=0,aK=aO.length;aN<aK;aN++){if(aO[aN].getAttribute("name")===aM[1]){aL.push(aO[aN])}}return aL.length===0?null:aL}},TAG:function(aK,aL){return aL.getElementsByTagName(aK[1])}},preFilter:{CLASS:function(aN,aL,aM,aK,aQ,aR){aN=" "+aN[1].replace(/\\/g,"")+" ";if(aR){return aN}for(var aO=0,aP;(aP=aL[aO])!=null;aO++){if(aP){if(aQ^(aP.className&&(" "+aP.className+" ").replace(/[\t\n]/g," ").indexOf(aN)>=0)){if(!aM){aK.push(aP)}}else{if(aM){aL[aO]=false}}}}return false},ID:function(aK){return aK[1].replace(/\\/g,"")},TAG:function(aL,aK){return aL[1].toLowerCase()},CHILD:function(aK){if(aK[1]==="nth"){var aL=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(aK[2]==="even"&&"2n"||aK[2]==="odd"&&"2n+1"||!/\D/.test(aK[2])&&"0n+"+aK[2]||aK[2]);aK[2]=(aL[1]+(aL[2]||1))-0;aK[3]=aL[3]-0}aK[0]=aE++;return aK},ATTR:function(aO,aL,aM,aK,aP,aQ){var aN=aO[1].replace(/\\/g,"");if(!aQ&&aA.attrMap[aN]){aO[1]=aA.attrMap[aN]}if(aO[2]==="~="){aO[4]=" "+aO[4]+" "}return aO},PSEUDO:function(aO,aL,aM,aK,aP){if(aO[1]==="not"){if((aD.exec(aO[3])||"").length>1||/^\w/.test(aO[3])){aO[3]=au(aO[3],null,null,aL)}else{var aN=au.filter(aO[3],aL,aM,true^aP);if(!aM){aK.push.apply(aK,aN)}return false}}else{if(aA.match.POS.test(aO[0])||aA.match.CHILD.test(aO[0])){return true}}return aO},POS:function(aK){aK.unshift(true);return aK}},filters:{enabled:function(aK){return aK.disabled===false&&aK.type!=="hidden"},disabled:function(aK){return aK.disabled===true},checked:function(aK){return aK.checked===true},selected:function(aK){aK.parentNode.selectedIndex;return aK.selected===true},parent:function(aK){return !!aK.firstChild},empty:function(aK){return !aK.firstChild},has:function(aM,aL,aK){return !!au(aK[3],aM).length},header:function(aK){return/h\d/i.test(aK.nodeName)},text:function(aK){return"text"===aK.type},radio:function(aK){return"radio"===aK.type},checkbox:function(aK){return"checkbox"===aK.type},file:function(aK){return"file"===aK.type},password:function(aK){return"password"===aK.type},submit:function(aK){return"submit"===aK.type},image:function(aK){return"image"===aK.type},reset:function(aK){return"reset"===aK.type},button:function(aK){return"button"===aK.type||aK.nodeName.toLowerCase()==="button"},input:function(aK){return/input|select|textarea|button/i.test(aK.nodeName)}},setFilters:{first:function(aL,aK){return aK===0},last:function(aM,aL,aK,aN){return aL===aN.length-1},even:function(aL,aK){return aK%2===0},odd:function(aL,aK){return aK%2===1},lt:function(aM,aL,aK){return aL<aK[3]-0},gt:function(aM,aL,aK){return aL>aK[3]-0},nth:function(aM,aL,aK){return aK[3]-0===aL},eq:function(aM,aL,aK){return aK[3]-0===aL}},filter:{PSEUDO:function(aQ,aM,aN,aR){var aL=aM[1],aO=aA.filters[aL];if(aO){return aO(aQ,aN,aM,aR)}else{if(aL==="contains"){return(aQ.textContent||aQ.innerText||S([aQ])||"").indexOf(aM[3])>=0}else{if(aL==="not"){var aP=aM[3];for(var aN=0,aK=aP.length;aN<aK;aN++){if(aP[aN]===aQ){return false}}return true}else{throw"Syntax error, unrecognized expression: "+aL}}}},CHILD:function(aK,aN){var aQ=aN[1],aL=aK;switch(aQ){case"only":case"first":while((aL=aL.previousSibling)){if(aL.nodeType===1){return false}}if(aQ==="first"){return true}aL=aK;case"last":while((aL=aL.nextSibling)){if(aL.nodeType===1){return false}}return true;case"nth":var aM=aN[2],aT=aN[3];if(aM===1&&aT===0){return true}var aP=aN[0],aS=aK.parentNode;if(aS&&(aS.sizcache!==aP||!aK.nodeIndex)){var aO=0;for(aL=aS.firstChild;aL;aL=aL.nextSibling){if(aL.nodeType===1){aL.nodeIndex=++aO}}aS.sizcache=aP}var aR=aK.nodeIndex-aT;if(aM===0){return aR===0}else{return(aR%aM===0&&aR/aM>=0)}}},ID:function(aL,aK){return aL.nodeType===1&&aL.getAttribute("id")===aK},TAG:function(aL,aK){return(aK==="*"&&aL.nodeType===1)||aL.nodeName.toLowerCase()===aK},CLASS:function(aL,aK){return(" "+(aL.className||aL.getAttribute("class"))+" ").indexOf(aK)>-1},ATTR:function(aP,aN){var aM=aN[1],aK=aA.attrHandle[aM]?aA.attrHandle[aM](aP):aP[aM]!=null?aP[aM]:aP.getAttribute(aM),aQ=aK+"",aO=aN[2],aL=aN[4];return aK==null?aO==="!=":aO==="="?aQ===aL:aO==="*="?aQ.indexOf(aL)>=0:aO==="~="?(" "+aQ+" ").indexOf(aL)>=0:!aL?aQ&&aK!==false:aO==="!="?aQ!==aL:aO==="^="?aQ.indexOf(aL)===0:aO==="$="?aQ.substr(aQ.length-aL.length)===aL:aO==="|="?aQ===aL||aQ.substr(0,aL.length+1)===aL+"-":false},POS:function(aO,aL,aM,aP){var aK=aL[2],aN=aA.setFilters[aK];if(aN){return aN(aO,aM,aL,aP)}}}};var az=aA.match.POS;for(var aw in aA.match){aA.match[aw]=new RegExp(aA.match[aw].source+/(?![^\[]*\])(?![^\(]*\))/.source);aA.leftMatch[aw]=new RegExp(/(^(?:.|\r|\n)*?)/.source+aA.match[aw].source)}var aC=function(aL,aK){aL=Array.prototype.slice.call(aL,0);if(aK){aK.push.apply(aK,aL);return aK}return aL};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(aJ){aC=function(aO,aN){var aL=aN||[];if(aG.call(aO)==="[object Array]"){Array.prototype.push.apply(aL,aO)}else{if(typeof aO.length==="number"){for(var aM=0,aK=aO.length;aM<aK;aM++){aL.push(aO[aM])}}else{for(var aM=0;aO[aM];aM++){aL.push(aO[aM])}}}return aL}}var aF;if(document.documentElement.compareDocumentPosition){aF=function(aL,aK){if(!aL.compareDocumentPosition||!aK.compareDocumentPosition){if(aL==aK){ay=true}return aL.compareDocumentPosition?-1:1}var aM=aL.compareDocumentPosition(aK)&4?-1:aL===aK?0:1;if(aM===0){ay=true}return aM}}else{if("sourceIndex" in document.documentElement){aF=function(aL,aK){if(!aL.sourceIndex||!aK.sourceIndex){if(aL==aK){ay=true}return aL.sourceIndex?-1:1}var aM=aL.sourceIndex-aK.sourceIndex;if(aM===0){ay=true}return aM}}else{if(document.createRange){aF=function(aN,aL){if(!aN.ownerDocument||!aL.ownerDocument){if(aN==aL){ay=true}return aN.ownerDocument?-1:1}var aM=aN.ownerDocument.createRange(),aK=aL.ownerDocument.createRange();aM.setStart(aN,0);aM.setEnd(aN,0);aK.setStart(aL,0);aK.setEnd(aL,0);var aO=aM.compareBoundaryPoints(Range.START_TO_END,aK);if(aO===0){ay=true}return aO}}}}function S(aK){var aL="",aN;for(var aM=0;aK[aM];aM++){aN=aK[aM];if(aN.nodeType===3||aN.nodeType===4){aL+=aN.nodeValue}else{if(aN.nodeType!==8){aL+=S(aN.childNodes)}}}return aL}(function(){var aL=document.createElement("div"),aM="script"+(new Date).getTime();aL.innerHTML="<a name='"+aM+"'/>";var aK=document.documentElement;aK.insertBefore(aL,aK.firstChild);if(document.getElementById(aM)){aA.find.ID=function(aO,aP,aQ){if(typeof aP.getElementById!=="undefined"&&!aQ){var aN=aP.getElementById(aO[1]);return aN?aN.id===aO[1]||typeof aN.getAttributeNode!=="undefined"&&aN.getAttributeNode("id").nodeValue===aO[1]?[aN]:p:[]}};aA.filter.ID=function(aP,aN){var aO=typeof aP.getAttributeNode!=="undefined"&&aP.getAttributeNode("id");return aP.nodeType===1&&aO&&aO.nodeValue===aN}}aK.removeChild(aL);aK=aL=null})();(function(){var aK=document.createElement("div");aK.appendChild(document.createComment(""));if(aK.getElementsByTagName("*").length>0){aA.find.TAG=function(aL,aP){var aO=aP.getElementsByTagName(aL[1]);if(aL[1]==="*"){var aN=[];for(var aM=0;aO[aM];aM++){if(aO[aM].nodeType===1){aN.push(aO[aM])}}aO=aN}return aO}}aK.innerHTML="<a href='#'></a>";if(aK.firstChild&&typeof aK.firstChild.getAttribute!=="undefined"&&aK.firstChild.getAttribute("href")!=="#"){aA.attrHandle.href=function(aL){return aL.getAttribute("href",2)}}aK=null})();if(document.querySelectorAll){(function(){var aK=au,aM=document.createElement("div");aM.innerHTML="<p class='TEST'></p>";if(aM.querySelectorAll&&aM.querySelectorAll(".TEST").length===0){return}au=function(aQ,aP,aN,aO){aP=aP||document;if(!aO&&aP.nodeType===9&&!av(aP)){try{return aC(aP.querySelectorAll(aQ),aN)}catch(aR){}}return aK(aQ,aP,aN,aO)};for(var aL in aK){au[aL]=aK[aL]}aM=null})()}(function(){var aK=document.createElement("div");aK.innerHTML="<div class='test e'></div><div class='test'></div>";if(!aK.getElementsByClassName||aK.getElementsByClassName("e").length===0){return}aK.lastChild.className="e";if(aK.getElementsByClassName("e").length===1){return}aA.order.splice(1,0,"CLASS");aA.find.CLASS=function(aL,aM,aN){if(typeof aM.getElementsByClassName!=="undefined"&&!aN){return aM.getElementsByClassName(aL[1])}};aK=null})();function K(aL,aQ,aP,aT,aR,aS){for(var aN=0,aM=aT.length;aN<aM;aN++){var aK=aT[aN];if(aK){aK=aK[aL];var aO=false;while(aK){if(aK.sizcache===aP){aO=aT[aK.sizset];break}if(aK.nodeType===1&&!aS){aK.sizcache=aP;aK.sizset=aN}if(aK.nodeName.toLowerCase()===aQ){aO=aK;break}aK=aK[aL]}aT[aN]=aO}}}function aI(aL,aQ,aP,aT,aR,aS){for(var aN=0,aM=aT.length;aN<aM;aN++){var aK=aT[aN];if(aK){aK=aK[aL];var aO=false;while(aK){if(aK.sizcache===aP){aO=aT[aK.sizset];break}if(aK.nodeType===1){if(!aS){aK.sizcache=aP;aK.sizset=aN}if(typeof aQ!=="string"){if(aK===aQ){aO=true;break}}else{if(au.filter(aQ,[aK]).length>0){aO=aK;break}}}aK=aK[aL]}aT[aN]=aO}}}var aB=document.compareDocumentPosition?function(aL,aK){return aL.compareDocumentPosition(aK)&16}:function(aL,aK){return aL!==aK&&(aL.contains?aL.contains(aK):true)};var av=function(aK){var aL=(aK?aK.ownerDocument||aK:0).documentElement;return aL?aL.nodeName!=="HTML":false};var aH=function(aK,aR){var aN=[],aO="",aP,aM=aR.nodeType?[aR]:aR;while((aP=aA.match.PSEUDO.exec(aK))){aO+=aP[0];aK=aK.replace(aA.match.PSEUDO,"")}aK=aA.relative[aK]?aK+"*":aK;for(var aQ=0,aL=aM.length;aQ<aL;aQ++){au(aK,aM[aQ],aN)}return au.filter(aO,aN)};return au})();g.lang={code:"zh-TW",of:"的",loading:"讀取中",cancel:"取消",next:"下一頁",previous:"上一頁",play:"執行",pause:"暫停",close:"關閉",errors:{single:'您必須安裝 <a href="{0}">{1}</a> 這個瀏覽外掛程式才能檢視這裡的內容。',shared:'您必須安裝 <a href="{0}">{1}</a> 和 <a href="{2}">{3}</a> 這兩個瀏覽外掛程式才能檢視這裡的內容。',either:'您必須安裝 <a href="{0}">{1}</a> 或者是 the <a href="{2}">{3}</a> 這兩個其中一個瀏覽外掛程式才能檢視這裡的內容。'}};g.iframe=function(S,au){this.obj=S;this.id=au;var K=ag("sb-overlay");this.height=S.height?parseInt(S.height,10):K.offsetHeight;this.width=S.width?parseInt(S.width,10):K.offsetWidth};g.iframe.prototype={append:function(K,au){var S='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" style="visibility:hidden" onload="this.style.visibility=\'visible\'" scrolling="auto"';if(g.isIE){S+=' allowtransparency="true"';if(g.isIE6){S+=" src=\"javascript:false;document.write('');\""}}S+="></iframe>";K.innerHTML=S},remove:function(){var K=ag(this.id);if(K){z(K);if(g.isGecko){delete T.frames[this.id]}}},onLoad:function(){var K=g.isIE?ag(this.id).contentWindow:T.frames[this.id];K.location.href=this.obj.content}};var al=false,A=[],H=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],F,ah,v,P=true;function ae(au,aE,aB,az,aF){var K=(aE=="opacity"),aA=K?g.setOpacity:function(aG,aH){aG.style[aE]=""+aH+"px"};if(az==0||(!K&&!g.options.animate)||(K&&!g.options.animateFade)){aA(au,aB);if(aF){aF()}return}var aC=parseFloat(g.getStyle(au,aE))||0;var aD=aB-aC;if(aD==0){if(aF){aF()}return}az*=1000;var av=X(),ay=g.ease,ax=av+az,aw;var S=setInterval(function(){aw=X();if(aw>=ax){clearInterval(S);S=null;aA(au,aB);if(aF){aF()}}else{aA(au,aC+ay((aw-av)/az)*aD)}},10)}function I(){F.style.height=g.getWindowSize("Height")+"px";F.style.width=g.getWindowSize("Width")+"px"}function ad(){F.style.top=document.documentElement.scrollTop+"px";F.style.left=document.documentElement.scrollLeft+"px"}function y(K){if(K){ac(A,function(S,au){au[0].style.visibility=au[1]||""})}else{A=[];ac(g.options.troubleElements,function(au,S){ac(document.getElementsByTagName(S),function(av,aw){A.push([aw,aw.style.visibility]);aw.style.visibility="hidden"})})}}function x(au,K){var S=ag("sb-nav-"+au);if(S){S.style.display=K?"":"none"}}function n(K,ax){var aw=ag("sb-loading"),au=g.getCurrent().player,av=(au=="img"||au=="html");if(K){g.setOpacity(aw,0);aw.style.display="block";var S=function(){g.clearOpacity(aw);if(ax){ax()}};if(av){ae(aw,"opacity",1,g.options.fadeDuration,S)}else{S()}}else{var S=function(){aw.style.display="none";g.clearOpacity(aw);if(ax){ax()}};if(av){ae(aw,"opacity",0,g.options.fadeDuration,S)}else{S()}}}function at(aC){var ax=g.getCurrent();ag("sb-title-inner").innerHTML=ax.title||"";var aD,az,S,aE,aA;if(g.options.displayNav){aD=true;var aB=g.gallery.length;if(aB>1){if(g.options.continuous){az=aA=true}else{az=(aB-1)>g.current;aA=g.current>0}}if(g.options.slideshowDelay>0&&g.hasNext()){aE=!g.isPaused();S=!aE}}else{aD=az=S=aE=aA=false}x("close",aD);x("next",az);x("play",S);x("pause",aE);x("previous",aA);var K="";if(g.options.displayCounter&&g.gallery.length>1){var aB=g.gallery.length;if(g.options.counterType=="skip"){var aw=0,av=aB,au=parseInt(g.options.counterLimit)||0;if(au<aB&&au>2){var ay=Math.floor(au/2);aw=g.current-ay;if(aw<0){aw+=aB}av=g.current+(au-ay);if(av>aB){av-=aB}}while(aw!=av){if(aw==aB){aw=0}K+='<a onclick="Shadowbox.change('+aw+');"';if(aw==g.current){K+=' class="sb-counter-current"'}K+=">"+(++aw)+"</a>"}}else{K=[g.current+1,g.lang.of,aB].join(" ")}}ag("sb-counter").innerHTML=K;aC()}function u(av){var K=ag("sb-title-inner"),au=ag("sb-info-inner"),S=0.35;K.style.visibility=au.style.visibility="";if(K.innerHTML!=""){ae(K,"marginTop",0,S)}ae(au,"marginTop",0,S,av)}function ab(au,aA){var ay=ag("sb-title"),K=ag("sb-info"),av=ay.offsetHeight,aw=K.offsetHeight,ax=ag("sb-title-inner"),az=ag("sb-info-inner"),S=(au?0.35:0);ae(ax,"marginTop",av,S);ae(az,"marginTop",aw*-1,S,function(){ax.style.visibility=az.style.visibility="hidden";aA()})}function E(K,av,S,ax){var aw=ag("sb-wrapper-inner"),au=(S?g.options.resizeDuration:0);ae(v,"top",av,au);ae(aw,"height",K,au,ax)}function t(K,av,S,aw){var au=(S?g.options.resizeDuration:0);ae(v,"left",av,au);ae(v,"width",K,au,aw)}function R(aA,au){var aw=ag("sb-body-inner"),aA=parseInt(aA),au=parseInt(au),S=v.offsetHeight-aw.offsetHeight,K=v.offsetWidth-aw.offsetWidth,ay=ah.offsetHeight,az=ah.offsetWidth,ax=parseInt(g.options.viewportPadding)||20,av=(g.player&&g.options.handleOversize!="drag");return g.setDimensions(aA,au,ay,az,S,K,ax,av)}var k={};k.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>';k.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#fff",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};k.init=function(){g.appendHTML(document.body,s(k.markup,g.lang));k.body=ag("sb-body-inner");F=ag("sb-container");ah=ag("sb-overlay");v=ag("sb-wrapper");if(!L){F.style.position="absolute"}if(!ak){var au,K,S=/url\("(.*\.png)"\)/;ac(H,function(aw,ax){au=ag(ax);if(au){K=g.getStyle(au,"backgroundImage").match(S);if(K){au.style.backgroundImage="none";au.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+K[1]+",sizingMethod=scale);"}}})}var av;j(T,"resize",function(){if(av){clearTimeout(av);av=null}if(w){av=setTimeout(k.onWindowResize,10)}})};k.onOpen=function(K,au){P=false;F.style.display="block";I();var S=R(g.options.initialHeight,g.options.initialWidth);E(S.innerHeight,S.top);t(S.width,S.left);if(g.options.showOverlay){ah.style.backgroundColor=g.options.overlayColor;g.setOpacity(ah,0);if(!g.options.modal){j(ah,"click",g.close)}al=true}if(!L){ad();j(T,"scroll",ad)}y();F.style.visibility="visible";if(al){ae(ah,"opacity",g.options.overlayOpacity,g.options.fadeDuration,au)}else{au()}};k.onLoad=function(S,K){n(true);while(k.body.firstChild){z(k.body.firstChild)}ab(S,function(){if(!w){return}if(!S){v.style.visibility="visible"}at(K)})};k.onReady=function(av){if(!w){return}var S=g.player,au=R(S.height,S.width);var K=function(){u(av)};switch(g.options.animSequence){case"hw":E(au.innerHeight,au.top,true,function(){t(au.width,au.left,true,K)});break;case"wh":t(au.width,au.left,true,function(){E(au.innerHeight,au.top,true,K)});break;default:t(au.width,au.left,true);E(au.innerHeight,au.top,true,K)}};k.onShow=function(K){n(false,K);P=true};k.onClose=function(){if(!L){a(T,"scroll",ad)}a(ah,"click",g.close);v.style.visibility="hidden";var K=function(){F.style.visibility="hidden";F.style.display="none";y(true)};if(al){ae(ah,"opacity",0,g.options.fadeDuration,K)}else{K()}};k.onPlay=function(){x("play",false);x("pause",true)};k.onPause=function(){x("pause",false);x("play",true)};k.onWindowResize=function(){if(!P){return}I();var K=g.player,S=R(K.height,K.width);t(S.width,S.left);E(S.innerHeight,S.top);if(K.onWindowResize){K.onWindowResize()}};g.skin=k;T.Shadowbox=g})(window);
|