Вы находитесь на странице: 1из 10

/*! * Shadowbox.js, version 3.0.3 * http://shadowbox-js.com/ * * Copyright 2007-2010, Michael J. I.

Jackson * 2010-03-10 00:00:00 +0000 */ (function(window, undefined) { var S={version:"3.0.3"};var ua=navigator.userAgent.toLowerCase();if(ua.indexOf(" windows")>-1 ua.indexOf("win32")>-1){S.isWindows=true}else{if(ua.indexOf("macin tosh")>-1 ua.indexOf("mac os x")>-1){S.isMac=true}else{if(ua.indexOf("linux")>1){S.isLinux=true}}}S.isIE=ua.indexOf("msie")>-1;S.isIE6=ua.indexOf("msie 6")>-1 ;S.isIE7=ua.indexOf("msie 7")>-1;S.isGecko=ua.indexOf("gecko")>-1&&ua.indexOf("s afari")==-1;S.isWebKit=ua.indexOf("applewebkit/")>-1;var inlineId=/#(.+)$/,galle ryName=/^(light shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/, fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i;var open=false,ini tialized=false,lastOptions={},slideDelay=0,slideStart,slideTimer;S.current=-1;S. dimensions=null;S.ease=function(a){return 1+Math.pow(a-1,3)};S.errorInfo={fla:{n ame:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTim e",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Play er",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",u rl:"http://www.flip4mac.com/wmv_download.htm"}};S.gallery=[];S.onReady=noop;S.pa th='http://www.gov.ph/wp-content/plugins/shadowbox-js/shadowbox/';S.player=null; S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:t rue,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscr een:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsu pported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieCon trols:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=fun ction(){return S.current>-1?S.gallery[S.current]:null};S.hasNext=function(){retu rn S.gallery.length>1&&(S.current!=S.gallery.length-1 S.options.continuous)};S. isOpen=function(){return open};S.isPaused=function(){return slideTimer=="pause"} ;S.applyOptions=function(a){lastOptions=apply({},S.options);apply(S.options,a)}; S.revertOptions=function(){apply(S.options,lastOptions)};S.init=function(c,f){if (initialized){return}initialized=true;if(S.skin.options){apply(S.options,S.skin. options)}if(c){apply(S.options,c)}if(!S.path){var e,b=document.getElementsByTagN ame("script");for(var d=0,a=b.length;d<a;++d){e=scriptPath.exec(b[d].src);if(e){ S.path=e[1];break}}}if(f){S.onReady=f}bindLoad()};S.open=function(b){if(open){re turn}var a=S.makeGallery(b);S.gallery=a[0];S.current=a[1];b=S.getCurrent();if(b= =null){return}S.applyOptions(b.options {});filterGallery();if(S.gallery.length) {b=S.getCurrent();if(S.options.onOpen(b)===false){return}open=true;S.skin.onOpen (b,load)}};S.close=function(){if(!open){return}open=false;if(S.player){S.player. remove();S.player=null}if(typeof slideTimer=="number"){clearTimeout(slideTimer); slideTimer=null}slideDelay=0;listenKeys(false);S.options.onClose(S.getCurrent()) ;S.skin.onClose();S.revertOptions()};S.play=function(){if(!S.hasNext()){return}i f(!slideDelay){slideDelay=S.options.slideshowDelay*1000}if(slideDelay){slideStar t=now();slideTimer=setTimeout(function(){slideDelay=slideStart=0;S.next()},slide Delay);if(S.skin.onPlay){S.skin.onPlay()}}};S.pause=function(){if(typeof slideTi mer!="number"){return}slideDelay=Math.max(0,slideDelay-(now()-slideStart));if(sl ideDelay){clearTimeout(slideTimer);slideTimer="pause";if(S.skin.onPause){S.skin. onPause()}}};S.change=function(a){if(!(a in S.gallery)){if(S.options.continuous) {a=(a<0?S.gallery.length+a:0);if(!(a in S.gallery)){return}}else{return}}S.curre nt=a;if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null;sl ideDelay=slideStart=0}S.options.onChange(S.getCurrent());load(true)};S.next=func tion(){S.change(S.current+1)};S.previous=function(){S.change(S.current-1)};S.set Dimensions=function(o,f,m,n,e,a,k,h){var j=o,d=f;var i=2*k+e;if(o+i>m){o=m-i}var c=2*k+a;if(f+c>n){f=n-c}var b=(j-o)/j,l=(d-f)/d,g=(b>0 l>0);if(h&&g){if(b>l){f =Math.round((d/j)*o)}else{if(l>b){o=Math.round((j/d)*f)}}}S.dimensions={height:o +e,width:f+a,innerHeight:o,innerWidth:f,top:Math.floor((m-(o+i))/2+k),left:Math. floor((n-(f+c))/2+k),oversized:g};return S.dimensions};S.makeGallery=function(e) {var a=[],d=-1;if(typeof e=="string"){e=[e]}if(typeof e.length=="number"){each(e

,function(g,h){if(h.content){a[g]=h}else{a[g]={content:h}}});d=0}else{if(e.tagNa me){var b=S.getCache(e);e=b?b:S.makeObject(e)}if(e.gallery){a=[];var f;for(var c in S.cache){f=S.cache[c];if(f.gallery&&f.gallery==e.gallery){if(d==-1&&f.conten t==e.content){d=a.length}a.push(f)}}if(d==-1){a.unshift(e);d=0}}else{a=[e];d=0}} each(a,function(g,h){a[g]=apply({},h)});return[a,d]};S.makeObject=function(d,c){ var e={content:d.href,title:d.getAttribute("title") "",link:d};if(c){c=apply({} ,c);each(["player","title","height","width","gallery"],function(f,g){if(typeof c [g]!="undefined"){e[g]=c[g];delete c[g]}});e.options=c}else{e.options={}}if(!e.p layer){e.player=S.getPlayer(e.content)}var a=d.getAttribute("rel");if(a){var b=a .match(galleryName);if(b){e.gallery=escape(b[2])}each(a.split(";"),function(f,g) {b=g.match(inlineParam);if(b){e[b[1]]=b[2]}})}return e};S.getPlayer=function(c){ if(c.indexOf("#")>-1&&c.indexOf(document.location.href)==0){return"inline"}var d =c.indexOf("?");if(d>-1){c=c.substring(0,d)}var b,a=c.match(fileExtension);if(a) {b=a[0].toLowerCase()}if(b){if(S.img&&S.img.ext.indexOf(b)>-1){return"img"}if(S. swf&&S.swf.ext.indexOf(b)>-1){return"swf"}if(S.flv&&S.flv.ext.indexOf(b)>-1){ret urn"flv"}if(S.qt&&S.qt.ext.indexOf(b)>-1){if(S.wmp&&S.wmp.ext.indexOf(b)>-1){ret urn"qtwmp"}else{return"qt"}}if(S.wmp&&S.wmp.ext.indexOf(b)>-1){return"wmp"}}retu rn"iframe"};function filterGallery(){var d=S.errorInfo,e=S.plugins,g,h,l,c,k,b,j ,a;for(var f=0;f<S.gallery.length;++f){g=S.gallery[f];h=false;l=null;switch(g.pl ayer){case"flv":case"swf":if(!e.fla){l="fla"}break;case"qt":if(!e.qt){l="qt"}bre ak;case"wmp":if(S.isMac){if(e.qt&&e.f4m){g.player="qt"}else{l="qtf4m"}}else{if(! e.wmp){l="wmp"}}break;case"qtwmp":if(e.qt){g.player="qt"}else{if(e.wmp){g.player ="wmp"}else{l="qtwmp"}}break}if(l){if(S.options.handleUnsupported=="link"){switc h(l){case"qtf4m":k="shared";b=[d.qt.url,d.qt.name,d.f4m.url,d.f4m.name];break;ca se"qtwmp":k="either";b=[d.qt.url,d.qt.name,d.wmp.url,d.wmp.name];break;default:k ="single";b=[d[l].url,d[l].name]}g.player="html";g.content='<div class="sb-messa ge">'+sprintf(S.lang.errors[k],b)+"</div>"}else{h=true}}else{if(g.player=="inlin e"){c=inlineId.exec(g.content);if(c){j=get(c[1]);if(j){g.content=j.innerHTML}els e{h=true}}else{h=true}}else{if(g.player=="swf" g.player=="flv"){a=(g.options&&g .options.flashVersion) S.options.flashVersion;if(S.flash&&!S.flash.hasFlashPlay erVersion(a)){g.width=310;g.height=177}}}}if(h){S.gallery.splice(f,1);if(f<S.cur rent){--S.current}else{if(f==S.current){S.current=f>0?f-1:f}}--f}}}function list enKeys(a){if(!S.options.enableKeys){return}(a?addEvent:removeEvent)(document,"ke ydown",handleKey)}function handleKey(c){if(c.metaKey c.shiftKey c.altKey c.ct rlKey){return}var b=keyCode(c),a;switch(b){case 81:case 88:case 27:a=S.close;bre ak;case 37:a=S.previous;break;case 39:a=S.next;break;case 32:a=typeof slideTimer =="number"?S.pause:S.play;break}if(a){preventDefault(c);a()}}function load(i){li stenKeys(false);var h=S.getCurrent();var e=(h.player=="inline"?"html":h.player); if(typeof S[e]!="function"){throw"unknown player "+e}if(i){S.player.remove();S.r evertOptions();S.applyOptions(h.options {})}S.player=new S[e](h,S.playerId);if( S.gallery.length>1){var f=S.gallery[S.current+1] S.gallery[0];if(f.player=="img "){var d=new Image();d.src=f.content}var g=S.gallery[S.current-1] S.gallery[S.g allery.length-1];if(g.player=="img"){var c=new Image();c.src=g.content}}S.skin.o nLoad(i,waitReady)}function waitReady(){if(!open){return}if(typeof S.player.read y!="undefined"){var a=setInterval(function(){if(open){if(S.player.ready){clearIn terval(a);a=null;S.skin.onReady(show)}}else{clearInterval(a);a=null}},10)}else{S .skin.onReady(show)}}function show(){if(!open){return}S.player.append(S.skin.bod y,S.dimensions);S.skin.onShow(finish)}function finish(){if(!open){return}if(S.pl ayer.onLoad){S.player.onLoad()}S.options.onFinish(S.getCurrent());if(!S.isPaused ()){S.play()}listenKeys(true)};if(!Array.prototype.indexOf){Array.prototype.inde xOf=function(b,c){var a=this.length>>>0;c=c 0;if(c<0){c+=a}for(;c<a;++c){if(c i n this&&this[c]===b){return c}}return -1}}function now(){return(new Date).getTim e()}function apply(a,c){for(var b in c){a[b]=c[b]}return a}function each(d,e){va r b=0,a=d.length;for(var c=d[0];b<a&&e.call(c,b,c)!==false;c=d[++b]){}}function sprintf(b,a){return b.replace(/\{(\w+?)\}/g,function(c,d){return a[d]})}function noop(){}function get(a){return document.getElementById(a)}function remove(a){a. parentNode.removeChild(a)}var supportsOpacity=true,supportsFixed=true;function c heckSupport(){var a=document.body,b=document.createElement("div");supportsOpacit y=typeof b.style.opacity==="string";b.style.position="fixed";b.style.margin=0;b. style.top="20px";a.appendChild(b,a.firstChild);supportsFixed=b.offsetTop==20;a.r

emoveChild(b)}S.getStyle=(function(){var a=/opacity=([^)]*)/,b=document.defaultV iew&&document.defaultView.getComputedStyle;return function(f,e){var d;if(!suppor tsOpacity&&e=="opacity"&&f.currentStyle){d=a.test(f.currentStyle.filter "")?(pa rseFloat(RegExp.$1)/100)+"":"";return d===""?"1":d}if(b){var c=b(f,null);if(c){d =c[e]}if(e=="opacity"&&d==""){d="1"}}else{d=f.currentStyle[e]}return d}})();S.ap pendHTML=function(c,b){if(c.insertAdjacentHTML){c.insertAdjacentHTML("BeforeEnd" ,b)}else{if(c.lastChild){var a=c.ownerDocument.createRange();a.setStartAfter(c.l astChild);var d=a.createContextualFragment(b);c.appendChild(d)}else{c.innerHTML= b}}};S.getWindowSize=function(a){if(document.compatMode==="CSS1Compat"){return d ocument.documentElement["client"+a]}return document.body["client"+a]};S.setOpaci ty=function(c,a){var b=c.style;if(supportsOpacity){b.opacity=(a==1?"":a)}else{b. zoom=1;if(a==1){if(typeof b.filter=="string"&&(/alpha/i).test(b.filter)){b.filte r=b.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"")}}else{b.filter=(b.filter "").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(a*100)+")"}}}; S.clearOpacity=function(a){S.setOpacity(a,1)};function getTarget(b){var a=b.targ et?b.target:b.srcElement;return a.nodeType==3?a.parentNode:a}function getPageXY( b){var a=b.pageX (b.clientX+(document.documentElement.scrollLeft document.body .scrollLeft)),c=b.pageY (b.clientY+(document.documentElement.scrollTop documen t.body.scrollTop));return[a,c]}function preventDefault(a){a.preventDefault()}fun ction keyCode(a){return a.which?a.which:a.keyCode}function addEvent(d,c,b){if(d. addEventListener){d.addEventListener(c,b,false)}else{if(d.nodeType===3 d.nodeTy pe===8){return}if(d.setInterval&&(d!==window&&!d.frameElement)){d=window}if(!b._ _guid){b.__guid=addEvent.guid++}if(!d.events){d.events={}}var a=d.events[c];if(! a){a=d.events[c]={};if(d["on"+c]){a[0]=d["on"+c]}}a[b.__guid]=b;d["on"+c]=addEve nt.handleEvent}}addEvent.guid=1;addEvent.handleEvent=function(d){var a=true;d=d addEvent.fixEvent(((this.ownerDocument this.document this).parentWindow wind ow).event);var b=this.events[d.type];for(var c in b){this.__handleEvent=b[c];if( this.__handleEvent(d)===false){a=false}}return a};addEvent.preventDefault=functi on(){this.returnValue=false};addEvent.stopPropagation=function(){this.cancelBubb le=true};addEvent.fixEvent=function(a){a.preventDefault=addEvent.preventDefault; a.stopPropagation=addEvent.stopPropagation;return a};function removeEvent(c,b,a) {if(c.removeEventListener){c.removeEventListener(b,a,false)}else{if(c.events&&c. events[b]){delete c.events[b][a.__guid]}}};var loaded=false,DOMContentLoaded;if( document.addEventListener){DOMContentLoaded=function(){document.removeEventListe ner("DOMContentLoaded",DOMContentLoaded,false);S.load()}}else{if(document.attach Event){DOMContentLoaded=function(){if(document.readyState==="complete"){document .detachEvent("onreadystatechange",DOMContentLoaded);S.load()}}}}function doScrol lCheck(){if(loaded){return}try{document.documentElement.doScroll("left")}catch(a ){setTimeout(doScrollCheck,1);return}S.load()}function bindLoad(){if(document.re adyState==="complete"){return S.load()}if(document.addEventListener){document.ad dEventListener("DOMContentLoaded",DOMContentLoaded,false);window.addEventListene r("load",S.load,false)}else{if(document.attachEvent){document.attachEvent("onrea dystatechange",DOMContentLoaded);window.attachEvent("onload",S.load);var a=false ;try{a=window.frameElement===null}catch(b){}if(document.documentElement.doScroll &&a){doScrollCheck()}}}}S.load=function(){if(loaded){return}if(!document.body){r eturn setTimeout(S.load,13)}loaded=true;checkSupport();S.onReady();if(!S.options .skipSetup){S.setup()}S.skin.init()};S.plugins={};if(navigator.plugins&&navigato r.plugins.length){var names=[];each(navigator.plugins,function(a,b){names.push(b .name)});names=names.join(",");var f4m=names.indexOf("Flip4Mac")>-1;S.plugins={f la:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m &&names.indexOf("Windows Media")>-1,f4m:f4m}}else{var detectPlugin=function(a){v ar b;try{b=new ActiveXObject(a)}catch(c){}return !!b};S.plugins={fla:detectPlugi n("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:de tectPlugin("wmplayer.ocx"),f4m:false}};var relAttr=/^(light shadow)box/i,expando ="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(b){var c=[];if(!b){ var a;each(document.getElementsByTagName("a"),function(f,g){a=g.getAttribute("re l");if(a&&relAttr.test(a)){c.push(g)}})}else{var e=b.length;if(e){if(typeof b==" string"){if(S.find){c=S.find(b)}}else{if(e==2&&typeof b[0]=="string"&&b[1].nodeT ype){if(S.find){c=S.find(b[0],b[1])}}else{for(var d=0;d<e;++d){c[d]=b[d]}}}}else {c.push(b)}}return c};S.setup=function(a,b){each(S.select(a),function(c,d){S.add

Cache(d,b)})};S.teardown=function(a){each(S.select(a),function(b,c){S.removeCach e(c)})};S.addCache=function(c,a){var b=c[expando];if(b==undefined){b=cacheKey++; c[expando]=b;addEvent(c,"click",handleClick)}S.cache[b]=S.makeObject(c,a)};S.rem oveCache=function(a){removeEvent(a,"click",handleClick);delete S.cache[a[expando ]];a[expando]=null};S.getCache=function(b){var a=b[expando];return(a in S.cache& &S.cache[a])};S.clearCache=function(){for(var a in S.cache){S.removeCache(S.cach e[a].link)}S.cache={}};function handleClick(a){S.open(this);if(S.gallery.length) {preventDefault(a)}};/* * SWFObject v2.1 <http://code.google.com/p/swfobject/> * Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sl uis * This software is released under the MIT License <http://www.opensource.org/li censes/mit-license.php> * * Modified for inclusion in Shadowbox.js */ S.flash=(function(){var swfobject=function(){var UNDEF="undefined",OBJECT="objec t",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.Shockwav eFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFO bjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[ ],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltC ontentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){v ar w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UND EF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.p lugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKW AVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=UNDEF&&nav.mimeTypes[FLASH_ MIME_TYPE]&&!nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)){d=d.replace(/^.*\s+( \S+\s+\S+$)/,"$1");playerVersion[0]=parseInt(d.replace(/^(.*)\..*$/,"$1"),10);pl ayerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r /.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveX Object!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH _AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersio n=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Cras h=true}}if(!fp6Crash){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX)}catch(e){}}}if (!fp6Crash&&a){try{d=a.GetVariable("$version");if(d){d=d.split(" ")[1].split("," );playerVersion=[parseInt(d[0],10),parseInt(d[1],10),parseInt(d[2],10)]}}catch(e ){}}}}var u=nav.userAgent.toLowerCase(),p=nav.platform.toLowerCase(),webkit=/web kit/.test(u)?parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,ie= false,windows=p?/win/.test(p):/win/.test(u),mac=p?/mac/.test(p):/mac/.test(u); /*@cc_on ie = true; @if (@_win32) windows = true; @elif (@_mac) mac = true; @end @*/ return{w3cdom:w3cdom,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}( );var onDomLoad=function(){if(!ua.w3cdom){return}addDomLoadEvent(main);if(ua.ie& &ua.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>" );script=getElementById("__ie_ondomload");if(script){addListener(script,"onready statechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=U NDEF){timer=setInterval(function(){if(/loaded complete/.test(doc.readyState)){ca llDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventLi stener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFun ctions)}();function checkReadyState(){if(script.readyState=="complete"){script.p arentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFuncti ons(){if(isDomLoaded){return}if(ua.ie&&ua.win){var s=createElement("span");try{v ar t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild (t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}

var dl=domLoadFnArr.length;for(var i=0;i<dl;i++){domLoadFnArr[i]()}}function add DomLoadEvent(fn){if(isDomLoaded){fn()}else{domLoadFnArr[domLoadFnArr.length]=fn} }function addLoadEvent(fn){if(typeof win.addEventListener!=UNDEF){win.addEventLi stener("load",fn,false)}else{if(typeof doc.addEventListener!=UNDEF){doc.addEvent Listener("load",fn,false)}else{if(typeof win.attachEvent!=UNDEF){addListener(win ,"onload",fn)}else{if(typeof win.onload=="function"){var fnOld=win.onload;win.on load=function(){fnOld();fn()}}else{win.onload=fn}}}}}function main(){var rl=regO bjArr.length;for(var i=0;i<rl;i++){var id=regObjArr[i].id;if(ua.pv[0]>0){var obj =getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.get Attribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAtt ribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit& &ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expre ssInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win ua.mac) ){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibi lity(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(O BJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a ){var al=a.length;for(var i=0;i<al;i++){if(a[i].nodeName=="DATA"){e.setAttribute ("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c =nestedObj.childNodes;if(c){var cl=c.length;for(var j=0;j<cl;j++){if(c[j].nodeTy pe==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].get Attribute("value"))}}}obj.parentNode.replaceChild(e,obj)}}function showExpressIn stall(regObj){isExpressInstallActive=true;var obj=getElementById(regObj.id);if(o bj){if(regObj.altContentId){var ac=getElementById(regObj.altContentId);if(ac){st oredAltContent=ac;storedAltContentId=regObj.altContentId}}else{storedAltContent= abstractAltContent(obj)}if(!(/%$/.test(regObj.width))&&parseInt(regObj.width,10) <310){regObj.width="310"}if(!(/%$/.test(regObj.height))&&parseInt(regObj.height, 10)<137){regObj.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player In stallation";var pt=ua.ie&&ua.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectU RL="+win.location+"&MMplayerType="+pt+"&MMdoctitle="+dt,replaceId=regObj.id;if(u a.ie&&ua.win&&obj.readyState!=4){var newObj=createElement("div");replaceId+="SWF ObjectNew";newObj.setAttribute("id",replaceId);obj.parentNode.insertBefore(newOb j,obj);obj.style.display="none";var fn=function(){obj.parentNode.removeChild(obj )};addListener(win,"onload",fn)}createSWF({data:regObj.expressInstall,id:EXPRESS _INSTALL_ID,width:regObj.width,height:regObj.height},{flashvars:fv},replaceId)}} function displayAltContent(obj){if(ua.ie&&ua.win&&obj.readyState!=4){var el=crea teElement("div");obj.parentNode.insertBefore(el,obj);el.parentNode.replaceChild( abstractAltContent(obj),el);obj.style.display="none";var fn=function(){obj.paren tNode.removeChild(obj)};addListener(win,"onload",fn)}else{obj.parentNode.replace Child(abstractAltContent(obj),obj)}}function abstractAltContent(obj){var ac=crea teElement("div");if(ua.win&&ua.ie){ac.innerHTML=obj.innerHTML}else{var nestedObj =obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var c=nestedObj.childNodes;if (c){var cl=c.length;for(var i=0;i<cl;i++){if(!(c[i].nodeType==1&&c[i].nodeName== "PARAM")&&!(c[i].nodeType==8)){ac.appendChild(c[i].cloneNode(true))}}}}}return a c}function createSWF(attObj,parObj,id){var r,el=getElementById(id);if(el){if(typ eof attObj.id==UNDEF){attObj.id=id}if(ua.ie&&ua.win){var att="";for(var i in att Obj){if(attObj[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){parObj.movie =attObj[i]}else{if(i.toLowerCase()=="styleclass"){att+=' class="'+attObj[i]+'"'} else{if(i.toLowerCase()!="classid"){att+=" "+i+'="'+attObj[i]+'"'}}}}}var par="" ;for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par+='<param name="'+j+ '" value="'+parObj[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D -11cf-96B8-444553540000"'+att+">"+par+"</object>";objIdArr[objIdArr.length]=attO bj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=create Element("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if( attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src" ,attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj [k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e. setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=crea teElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if (attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribut

e("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj [m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()! ="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}} return r}function createObjParam(el,pName,pValue){var p=createElement("param");p .setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}fun ction removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT" obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE (id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.p arentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementByI d(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.p arentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.g etElementById(id)}catch(e){}return el}function createElement(el){return doc.crea teElement(el)}function addListener(target,eventType,fn){target.attachEvent(event Type,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPla yerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt (v[1],10) 0;v[2]=parseInt(v[2],10) 0;return(pv[0]>v[0] (pv[0]==v[0]&&pv[1]>v[ 1]) (pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]))?true:false}function createCSS(sel, decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=creat eElement("style");s.setAttribute("type","text/css");s.setAttribute("media","scre en");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.cr eateTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.s tyleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleShe ets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setV isibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getEl ementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visi bility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBad Chars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup =function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=li stenersArr.length;for(var i=0;i<ll;i++){listenersArr[i][0].detachEvent(listeners Arr[i][1],listenersArr[i][2])}var il=objIdArr.length;for(var j=0;j<il;j++){remov eSWF(objIdArr[j])}for(var k in ua){ua[k]=null}ua=null;for(var l in swfobject){sw fobject[l]=null}swfobject=null})}}();return{registerObject:function(objectIdStr, swfVersionStr,xiSwfUrlStr){if(!ua.w3cdom !objectIdStr !swfVersionStr){return}v ar regObj={};regObj.id=objectIdStr;regObj.swfVersion=swfVersionStr;regObj.expres sInstall=xiSwfUrlStr?xiSwfUrlStr:false;regObjArr[regObjArr.length]=regObj;setVis ibility(objectIdStr,false)},getObjectById:function(objectIdStr){var r=null;if(ua .w3cdom){var o=getElementById(objectIdStr);if(o){var n=o.getElementsByTagName(OB JECT)[0];if(!n (n&&typeof o.SetVariable!=UNDEF)){r=o}else{if(typeof n.SetVariab le!=UNDEF){r=n}}}}return r},embedSWF:function(swfUrlStr,replaceElemIdStr,widthSt r,heightStr,swfVersionStr,xiSwfUrlStr,flashvarsObj,parObj,attObj){if(!ua.w3cdom !swfUrlStr !replaceElemIdStr !widthStr !heightStr !swfVersionStr){return}wi dthStr+="";heightStr+="";if(hasPlayerVersion(swfVersionStr)){setVisibility(repla ceElemIdStr,false);var att={};if(attObj&&typeof attObj===OBJECT){for(var i in at tObj){if(attObj[i]!=Object.prototype[i]){att[i]=attObj[i]}}}att.data=swfUrlStr;a tt.width=widthStr;att.height=heightStr;var par={};if(parObj&&typeof parObj===OBJ ECT){for(var j in parObj){if(parObj[j]!=Object.prototype[j]){par[j]=parObj[j]}}} if(flashvarsObj&&typeof flashvarsObj===OBJECT){for(var k in flashvarsObj){if(fla shvarsObj[k]!=Object.prototype[k]){if(typeof par.flashvars!=UNDEF){par.flashvars +="&"+k+"="+flashvarsObj[k]}else{par.flashvars=k+"="+flashvarsObj[k]}}}}addDomLo adEvent(function(){createSWF(att,par,replaceElemIdStr);if(att.id==replaceElemIdS tr){setVisibility(replaceElemIdStr,true)}})}else{if(xiSwfUrlStr&&!isExpressInsta llActive&&hasPlayerVersion("6.0.65")&&(ua.win ua.mac)){isExpressInstallActive=t rue;setVisibility(replaceElemIdStr,false);addDomLoadEvent(function(){var regObj= {};regObj.id=regObj.altContentId=replaceElemIdStr;regObj.width=widthStr;regObj.h eight=heightStr;regObj.expressInstall=xiSwfUrlStr;showExpressInstall(regObj)})}} },getFlashPlayerVersion:function(){return{major:ua.pv[0],minor:ua.pv[1],release: ua.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(attObj,parO bj,replaceElemIdStr){if(ua.w3cdom){return createSWF(attObj,parObj,replaceElemIdS tr)}else{return undefined}},removeSWF:function(objElemIdStr){if(ua.w3cdom){remov eSWF(objElemIdStr)}},createCSS:function(sel,decl){if(ua.w3cdom){createCSS(sel,de

cl)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamVal ue:function(param){var q=doc.location.search doc.location.hash;if(param==null){ return urlEncodeIfNecessary(q)}if(q){var pairs=q.substring(1).split("&");for(var i=0;i<pairs.length;i++){if(pairs[i].substring(0,pairs[i].indexOf("="))==param){ return urlEncodeIfNecessary(pairs[i].substring((pairs[i].indexOf("=")+1)))}}}ret urn""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltCon tent){var obj=getElementById(EXPRESS_INSTALL_ID);if(obj){obj.parentNode.replaceC hild(storedAltContent,obj);if(storedAltContentId){setVisibility(storedAltContent Id,true);if(ua.ie&&ua.win){storedAltContent.style.display="block"}}storedAltCont ent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();return swfo bject})();S.lang={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next ",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'Yo u must install the <a href="{0}">{1}</a> browser plugin to view this content.',s hared:'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 h ref="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this conte nt.'}};S.html=function(a,b){this.obj=a;this.id=b;this.height=a.height?parseInt(a .height,10):300;this.width=a.width?parseInt(a.width,10):500};S.html.prototype={a ppend:function(a,b){var c=document.createElement("div");c.id=this.id;c.className ="html";c.innerHTML=this.obj.content;a.appendChild(c)},remove:function(){var a=g et(this.id);if(a){remove(a)}}};S.iframe=function(b,c){this.obj=b;this.id=c;var a =get("sb-overlay");this.height=b.height?parseInt(b.height,10):a.offsetHeight;thi s.width=b.width?parseInt(b.width,10):a.offsetWidth};S.iframe.prototype={append:f unction(a,c){var b='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" wi dth="100%" frameborder="0" marginwidth="0" marginheight="0" style="visibility:hi dden" onload="this.style.visibility=\'visible\'" scrolling="auto"';if(S.isIE){b+ =' allowtransparency="true"';if(S.isIE6){b+=" src=\"javascript:false;document.wr ite('');\""}}b+="></iframe>";a.innerHTML=b},remove:function(){var a=get(this.id) ;if(a){remove(a);if(S.isGecko){delete window.frames[this.id]}}},onLoad:function( ){var a=S.isIE?get(this.id).contentWindow:window.frames[this.id];a.location.href =this.obj.content}};var pre,proxyId="sb-drag-proxy",dragData,dragProxy,dragTarge t;function resetDrag(){dragData={x:0,y:0,startX:null,startY:null}}function updat eProxy(){var a=S.dimensions;apply(dragProxy.style,{height:a.innerHeight+"px",wid th:a.innerWidth+"px"})}function enableDrag(){resetDrag();var a=["position:absolu te","cursor:"+(S.isGecko?"-moz-grab":"move"),"background-color:"+(S.isIE?"#fff;f ilter:alpha(opacity=0)":"transparent")].join(";");S.appendHTML(S.skin.body,'<div id="'+proxyId+'" style="'+a+'"></div>');dragProxy=get(proxyId);updateProxy();ad dEvent(dragProxy,"mousedown",startDrag)}function disableDrag(){if(dragProxy){rem oveEvent(dragProxy,"mousedown",startDrag);remove(dragProxy);dragProxy=null}dragT arget=null}function startDrag(b){preventDefault(b);var a=getPageXY(b);dragData.s tartX=a[0];dragData.startY=a[1];dragTarget=get(S.player.id);addEvent(document,"m ousemove",positionDrag);addEvent(document,"mouseup",endDrag);if(S.isGecko){dragP roxy.style.cursor="-moz-grabbing"}}function positionDrag(f){var a=S.player,g=S.d imensions,d=getPageXY(f);var c=d[0]-dragData.startX;dragData.startX+=c;dragData. x=Math.max(Math.min(0,dragData.x+c),g.innerWidth-a.width);var b=d[1]-dragData.st artY;dragData.startY+=b;dragData.y=Math.max(Math.min(0,dragData.y+b),g.innerHeig ht-a.height);apply(dragTarget.style,{left:dragData.x+"px",top:dragData.y+"px"})} function endDrag(){removeEvent(document,"mousemove",positionDrag);removeEvent(do cument,"mouseup",endDrag);if(S.isGecko){dragProxy.style.cursor="-moz-grab"}}S.im g=function(b,c){this.obj=b;this.id=c;this.ready=false;var a=this;pre=new Image() ;pre.onload=function(){a.height=b.height?parseInt(b.height,10):pre.height;a.widt h=b.width?parseInt(b.width,10):pre.width;a.ready=true;pre.onload=null;pre=null}; pre.src=b.content};S.img.ext=["bmp","gif","jpg","jpeg","png"];S.img.prototype={a ppend:function(b,e){var c=document.createElement("img");c.id=this.id;c.src=this. obj.content;c.style.position="absolute";var a,d;if(e.oversized&&S.options.handle Oversize=="resize"){a=e.innerHeight;d=e.innerWidth}else{a=this.height;d=this.wid th}c.setAttribute("height",a);c.setAttribute("width",d);b.appendChild(c)},remove :function(){var a=get(this.id);if(a){remove(a)}disableDrag();if(pre){pre.onload= null;pre=null}},onLoad:function(){var a=S.dimensions;if(a.oversized&&S.options.h andleOversize=="drag"){enableDrag()}},onWindowResize:function(){var d=S.dimensio

ns;switch(S.options.handleOversize){case"resize":var a=get(this.id);a.height=d.i nnerHeight;a.width=d.innerWidth;break;case"drag":if(dragTarget){var c=parseInt(S .getStyle(dragTarget,"top")),b=parseInt(S.getStyle(dragTarget,"left"));if(c+this .height<d.innerHeight){dragTarget.style.top=d.innerHeight-this.height+"px"}if(b+ this.width<d.innerWidth){dragTarget.style.left=d.innerWidth-this.width+"px"}upda teProxy()}break}}};var qtControllerHeight=16;S.qt=function(a,b){this.obj=a;this. id=b;this.height=a.height?parseInt(a.height,10):300;if(S.options.showMovieContro ls){this.height+=qtControllerHeight}this.width=a.width?parseInt(a.width,10):300} ;S.qt.ext=["dv","mov","moov","movie","mp4","avi","mpg","mpeg"];S.qt.prototype={a ppend:function(h,i){var b=S.options,c=String(b.autoplayMovies),j=String(b.showMo vieControls);var g="<object",e={id:this.id,name:this.id,height:this.height,width :this.width,kioskmode:"true"};if(S.isIE){e.classid="clsid:02BF25D5-8C17-4B23-BC8 0-D3488ABDDC6B";e.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version= 6,0,2,0"}else{e.type="video/quicktime";e.data=this.obj.content}for(var d in e){g +=" "+d+'="'+e[d]+'"'}g+=">";var f={src:this.obj.content,scale:"aspect",controll er:j,autoplay:c};for(var a in f){g+='<param name="'+a+'" value="'+f[a]+'">'}g+=" </object>";h.innerHTML=g},remove:function(){try{document[this.id].Stop()}catch(b ){}var a=get(this.id);if(a){remove(a)}}};S.swf=function(a,b){this.obj=a;this.id= b;this.height=a.height?parseInt(a.height,10):300;this.width=a.width?parseInt(a.w idth,10):300};S.swf.ext=["swf"];S.swf.prototype={append:function(g,i){var f=docu ment.createElement("div");f.id=this.id;g.appendChild(f);var j=i.innerHeight,b=i. innerWidth,c=this.obj.content,h=S.options.flashVersion,a=S.path+"expressInstall. swf",d=S.options.flashVars,e=S.options.flashParams;S.flash.embedSWF(c,this.id,b, j,h,a,d,e)},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF (this.id)},onWindowResize:function(){var b=S.dimensions,a=get(this.id);a.height= b.innerHeight;a.width=b.innerWidth}};var wmpControllerHeight=(S.isIE?70:45);S.wm p=function(a,b){this.obj=a;this.id=b;this.height=a.height?parseInt(a.height,10): 300;if(S.options.showMovieControls){this.height+=wmpControllerHeight}this.width= a.width?parseInt(a.width,10):300};S.wmp.ext=["asf","avi","mpg","mpeg","wm","wmv" ];S.wmp.prototype={append:function(a,g){var c=S.options,d=c.autoplayMovies?1:0;v ar b='<object id="'+this.id+'" name="'+this.id+'" height="'+this.height+'" width ="'+this.width+'"',f={autostart:c.autoplayMovies?1:0};if(S.isIE){b+=' classid="c lsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"';f.url=this.obj.content;f.uimode=c.sh owMovieControls?"full":"none"}else{b+=' type="video/x-ms-wmv"';b+=' data="'+this .obj.content+'"';f.showcontrols=c.showMovieControls?1:0}b+=">";for(var e in f){b +='<param name="'+e+'" value="'+f[e]+'">'}b+="</object>";a.innerHTML=b},remove:f unction(){if(S.isIE){try{window[this.id].controls.stop();window[this.id].URL="mo vie"+now()+".wmv";window[this.id]=function(){}}catch(b){}}var a=get(this.id);if( a){setTimeout(function(){remove(a)},10)}}};var overlayOn=false,visibilityCache=[ ],pngIds=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-prev ious"],container,overlay,wrapper,doWindowResize=true;function animate(c,m,j,h,n) {var a=(m=="opacity"),i=a?S.setOpacity:function(o,p){o.style[m]=""+p+"px"};if(h= =0 (!a&&!S.options.animate) (a&&!S.options.animateFade)){i(c,j);if(n){n()}retu rn}var k=parseFloat(S.getStyle(c,m)) 0;var l=j-k;if(l==0){if(n){n()}return}h*=1 000;var d=now(),g=S.ease,f=d+h,e;var b=setInterval(function(){e=now();if(e>=f){c learInterval(b);b=null;i(c,j);if(n){n()}}else{i(c,k+g((e-d)/h)*l)}},10)}function setSize(){container.style.height=S.getWindowSize("Height")+"px";container.style .width=S.getWindowSize("Width")+"px"}function setPosition(){container.style.top= document.documentElement.scrollTop+"px";container.style.left=document.documentEl ement.scrollLeft+"px"}function toggleTroubleElements(a){if(a){each(visibilityCac he,function(b,c){c[0].style.visibility=c[1] ""})}else{visibilityCache=[];each(S .options.troubleElements,function(c,b){each(document.getElementsByTagName(b),fun ction(d,e){visibilityCache.push([e,e.style.visibility]);e.style.visibility="hidd en"})})}}function toggleNav(c,a){var b=get("sb-nav-"+c);if(b){b.style.display=a? "":"none"}}function toggleLoading(a,f){var e=get("sb-loading"),c=S.getCurrent(). player,d=(c=="img" c=="html");if(a){S.setOpacity(e,0);e.style.display="block";v ar b=function(){S.clearOpacity(e);if(f){f()}};if(d){animate(e,"opacity",1,S.opti ons.fadeDuration,b)}else{b()}}else{var b=function(){e.style.display="none";S.cle arOpacity(e);if(f){f()}};if(d){animate(e,"opacity",0,S.options.fadeDuration,b)}e lse{b()}}}function buildBars(m){var f=S.getCurrent();get("sb-title-inner").inner

HTML=f.title "";var n,j,b,o,k;if(S.options.displayNav){n=true;var l=S.gallery.l ength;if(l>1){if(S.options.continuous){j=k=true}else{j=(l-1)>S.current;k=S.curre nt>0}}if(S.options.slideshowDelay>0&&S.hasNext()){o=!S.isPaused();b=!o}}else{n=j =b=o=k=false}toggleNav("close",n);toggleNav("next",j);toggleNav("play",b);toggle Nav("pause",o);toggleNav("previous",k);var a="";if(S.options.displayCounter&&S.g allery.length>1){var l=S.gallery.length;if(S.options.counterType=="skip"){var e= 0,d=l,c=parseInt(S.options.counterLimit) 0;if(c<l&&c>2){var g=Math.floor(c/2);e =S.current-g;if(e<0){e+=l}d=S.current+(c-g);if(d>l){d-=l}}while(e!=d){if(e==l){e =0}a+='<a onclick="Shadowbox.change('+e+');"';if(e==S.current){a+=' class="sb-co unter-current"'}a+=">"+(++e)+"</a>"}}else{a=[S.current+1,S.lang.of,l].join(" ")} }get("sb-counter").innerHTML=a;m()}function showBars(d){var a=get("sb-title-inne r"),c=get("sb-info-inner"),b=0.35;a.style.visibility=c.style.visibility="";if(a. innerHTML!=""){animate(a,"marginTop",0,b)}animate(c,"marginTop",0,b,d)}function hideBars(c,i){var g=get("sb-title"),a=get("sb-info"),d=g.offsetHeight,e=a.offset Height,f=get("sb-title-inner"),h=get("sb-info-inner"),b=(c?0.35:0);animate(f,"ma rginTop",d,b);animate(h,"marginTop",e*-1,b,function(){f.style.visibility=h.style .visibility="hidden";i()})}function adjustHeight(a,d,b,f){var e=get("sb-wrapperinner"),c=(b?S.options.resizeDuration:0);animate(wrapper,"top",d,c);animate(e,"h eight",a,c,f)}function adjustWidth(a,d,b,e){var c=(b?S.options.resizeDuration:0) ;animate(wrapper,"left",d,c);animate(wrapper,"width",a,c,e)}function setDimensio ns(i,c){var e=get("sb-body-inner"),i=parseInt(i),c=parseInt(c),b=wrapper.offsetH eight-e.offsetHeight,a=wrapper.offsetWidth-e.offsetWidth,g=overlay.offsetHeight, h=overlay.offsetWidth,f=parseInt(S.options.viewportPadding) 20,d=(S.player&&S.o ptions.handleOversize!="drag");return S.setDimensions(i,c,g,h,b,a,f,d)}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-inn er"><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-in fo"><div id="sb-info-inner"><div id="sb-counter"></div><div id="sb-nav"><a id="s b-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="S hadowbox.pause()"></a><a id="sb-nav-previous" title="{previous}" onclick="Shadow box.previous()"></a></div></div></div></div></div>';K.options={animSequence:"syn c",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fad eDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000 ",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["sele ct","object","embed","canvas"]};K.init=function(){S.appendHTML(document.body,spr intf(K.markup,S.lang));K.body=get("sb-body-inner");container=get("sb-container") ;overlay=get("sb-overlay");wrapper=get("sb-wrapper");if(!supportsFixed){containe r.style.position="absolute"}if(!supportsOpacity){var c,a,b=/url\("(.*\.png)"\)/; each(pngIds,function(e,f){c=get(f);if(c){a=S.getStyle(c,"backgroundImage").match (b);if(a){c.style.backgroundImage="none";c.style.filter="progid:DXImageTransform .Microsoft.AlphaImageLoader(enabled=true,src="+a[1]+",sizingMethod=scale);"}}})} var d;addEvent(window,"resize",function(){if(d){clearTimeout(d);d=null}if(open){ d=setTimeout(K.onWindowResize,10)}})};K.onOpen=function(a,c){doWindowResize=fals e;container.style.display="block";setSize();var b=setDimensions(S.options.initia lHeight,S.options.initialWidth);adjustHeight(b.innerHeight,b.top);adjustWidth(b. width,b.left);if(S.options.showOverlay){overlay.style.backgroundColor=S.options. overlayColor;S.setOpacity(overlay,0);if(!S.options.modal){addEvent(overlay,"clic k",S.close)}overlayOn=true}if(!supportsFixed){setPosition();addEvent(window,"scr oll",setPosition)}toggleTroubleElements();container.style.visibility="visible";i f(overlayOn){animate(overlay,"opacity",S.options.overlayOpacity,S.options.fadeDu ration,c)}else{c()}};K.onLoad=function(b,a){toggleLoading(true);while(K.body.fir stChild){remove(K.body.firstChild)}hideBars(b,function(){if(!open){return}if(!b) {wrapper.style.visibility="visible"}buildBars(a)})};K.onReady=function(d){if(!op en){return}var b=S.player,c=setDimensions(b.height,b.width);var a=function(){sho wBars(d)};switch(S.options.animSequence){case"hw":adjustHeight(c.innerHeight,c.t op,true,function(){adjustWidth(c.width,c.left,true,a)});break;case"wh":adjustWid th(c.width,c.left,true,function(){adjustHeight(c.innerHeight,c.top,true,a)});bre

ak;default:adjustWidth(c.width,c.left,true);adjustHeight(c.innerHeight,c.top,tru e,a)}};K.onShow=function(a){toggleLoading(false,a);doWindowResize=true};K.onClos e=function(){if(!supportsFixed){removeEvent(window,"scroll",setPosition)}removeE vent(overlay,"click",S.close);wrapper.style.visibility="hidden";var a=function() {container.style.visibility="hidden";container.style.display="none";toggleTroubl eElements(true)};if(overlayOn){animate(overlay,"opacity",0,S.options.fadeDuratio n,a)}else{a()}};K.onPlay=function(){toggleNav("play",false);toggleNav("pause",tr ue)};K.onPause=function(){toggleNav("pause",false);toggleNav("play",true)};K.onW indowResize=function(){if(!doWindowResize){return}setSize();var a=S.player,b=set Dimensions(a.height,a.width);adjustWidth(b.width,b.left);adjustHeight(b.innerHei ght,b.top);if(a.onWindowResize){a.onWindowResize()}};S.skin=K;// expose window['Shadowbox'] = S; })(window);

Вам также может понравиться