if(typeof jQuery=='undefined'){throw'Unable to load Shadowbox, jQuery library not found';}
var Shadowbox={};Shadowbox.lib={adapter:'jquery',getStyle:function(el,style){return jQuery(el).css(style);},get:function(el){return(typeof el=='string')?document.getElementById(el):el;},remove:function(el){jQuery(el).remove();},getTarget:function(e){return e.target;},getPageXY:function(e){return[e.pageX,e.pageY];},preventDefault:function(e){e.preventDefault();},keyCode:function(e){return e.keyCode;},addEvent:function(el,name,handler){jQuery(el).bind(name,handler);},removeEvent:function(el,name,handler){jQuery(el).unbind(name,handler);},append:function(el,html){jQuery(el).append(html);}};(function($){$.fn.shadowbox=function(options){return this.each(function(){var $this=$(this);var opts=$.extend({},options||{},$.metadata?$this.metadata():$.meta?$this.data():{});var cls=this.className||'';opts.width=parseInt((cls.match(/w:(\d+)/)||[])[1])||opts.width;opts.height=parseInt((cls.match(/h:(\d+)/)||[])[1])||opts.height;Shadowbox.setup($this,opts);});};})(jQuery);if(typeof Shadowbox=='undefined'){throw'Unable to load Shadowbox, no base library adapter found';}
(function(){var version='2.1';var options={animate:true,animateFade:true,animSequence:'sync',autoplayMovies:true,autoDimensions:false,continuous:false,counterLimit:10,counterType:'default',displayCounter:true,displayNav:true,ease:function(x){return 1+Math.pow(x-1,3);},enableKeys:true,errors:{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'}},ext:{img:['png','jpg','jpeg','gif','bmp'],swf:['swf'],flv:['flv'],qt:['dv','mov','moov','movie','mp4'],wmp:['asf','wm','wmv'],qtwmp:['avi','mpg','mpeg'],iframe:['asp','aspx','cgi','cfm','htm','html','jsp','pl','php','php3','php4','php5','phtml','rb','rhtml','shtml','txt','vbs']},fadeDuration:0.35,flashBgColor:'#000000',flvPlayer:'flvplayer.swf',handleException:null,handleOversize:'resize',handleUnsupported:'link',initialHeight:160,initialWidth:320,modal:false,onChange:null,onClose:null,onFinish:null,onOpen:null,overlayColor:'#000',overlayOpacity:0.8,resizeDuration:0.35,showOverlay:true,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};var SB=Shadowbox;var SL=SB.lib;var default_options;var RE={alpha:/alpha\([^\)]*\)/gi,domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/,empty:/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i};var cache=[];var gallery;var current;var content;var content_id='sb-content';var dims;var initialized=false;var activated=false;var overlay_on=false;var slide_timer;var slide_start;var slide_delay=0;var v_cache=[];var ua=navigator.userAgent.toLowerCase();var client={isIE:ua.indexOf('msie')>-1,isIE7:ua.indexOf('msie 7')>-1,isGecko:ua.indexOf('gecko')>-1&&ua.indexOf('safari')==-1,isWindows:ua.indexOf('windows')>-1||ua.indexOf('win32')>-1,isMac:ua.indexOf('macintosh')>-1||ua.indexOf('mac os x')>-1,isLinux:ua.indexOf('linux')>-1};var ltIE7=client.isIE&&!client.isIE7;var apply=function(o,e){for(var p in e)o[p]=e[p];return o;};apply(Shadowbox.lib,{each:function(obj,fn,scope){for(var i=0,len=obj.length;i<len;++i){fn.call(scope||obj[i],obj[i],i,obj);}},createHTML:function(obj){var html='<'+obj.tag;for(var attr in obj){if(attr=='tag'||attr=='html'||attr=='children')continue;html+=(attr=='cls')?' class="'+obj['cls']+'"':' '+attr+'="'+obj[attr]+'"';}
if(RE.empty.test(obj.tag)){html+='/>';}else{html+='>';if(obj.children)SL.each(obj.children,function(c){html+=this.createHTML(c);},this);if(obj.html)html+=obj.html;html+='</'+obj.tag+'>';}
return html;},setOpacity:function(el,opacity){var s=el.style;if(window.ActiveXObject){s.zoom=1;s.filter=(s.filter||'').replace(RE.alpha,'')+
(opacity==1?'':' alpha(opacity='+(opacity*100)+')');}else{s.opacity=opacity;}}});var plugins;if(navigator.plugins&&navigator.plugins.length){var names=[];SL.each(navigator.plugins,function(p){names.push(p.name);});names=names.join();var detectPlugin=function(n){return names.indexOf(n)>-1;};var f4m=detectPlugin('Flip4Mac');plugins={fla:detectPlugin('Shockwave Flash'),qt:detectPlugin('QuickTime'),wmp:!f4m&&detectPlugin('Windows Media'),f4m:f4m};}else{var detectPlugin=function(n){try{var axo=new ActiveXObject(n);}catch(e){}
return!!axo;};plugins={fla:detectPlugin('ShockwaveFlash.ShockwaveFlash'),qt:detectPlugin('QuickTime.QuickTime'),wmp:detectPlugin('wmplayer.ocx'),f4m:false};}
var isLink=function(el){return el&&typeof el.tagName=='string'&&(el.tagName.toUpperCase()=='A'||el.tagName.toUpperCase()=='AREA');};var animate=function(el,p,to,d,cb){var from=parseFloat(SL.getStyle(el,p));if(isNaN(from))from=0;var delta=to-from;if(delta==0){if(cb)cb();return;}
var op=p=='opacity',effect=function(ease){var to=from+ease*delta;if(op){SL.setOpacity(el,to);}else{el.style[p]=to+'px';}};if(!d||(!options.animate&&!op)||(op&&!options.animateFade)){effect(1);if(cb)cb();return;}
d*=1000;var begin=new Date().getTime(),end=begin+d,timer=setInterval(function(){var time=new Date().getTime();if(time>=end){clearInterval(timer);effect(1);if(cb)cb();}else{effect(options.ease((time-begin)/d));}},10);};var clearOpacity=function(el){var s=el.style;if(client.isIE){if(typeof s.filter=='string'&&(/alpha/i).test(s.filter)){s.filter=s.filter.replace(/[\w\.]*alpha\(.*?\);?/i,'');}}else{s.opacity='';}};var getPlayer=function(url){var m=url.match(RE.domain),d=m&&document.domain==m[1];if(url.indexOf('#')>-1&&d)return'inline';var q=url.indexOf('?');if(q>-1)url=url.substring(0,q);if(RE.img.test(url))return'img';if(RE.swf.test(url))return plugins.fla?'swf':'unsupported-swf';if(RE.flv.test(url))return plugins.fla?'flv':'unsupported-flv';if(RE.qt.test(url))return plugins.qt?'qt':'unsupported-qt';if(RE.wmp.test(url)){if(plugins.wmp)return'wmp';if(plugins.f4m)return'qt';if(client.isMac)return plugins.qt?'unsupported-f4m':'unsupported-qtf4m';return'unsupported-wmp';}else if(RE.qtwmp.test(url)){if(plugins.qt)return'qt';if(plugins.wmp)return'wmp';return client.isMac?'unsupported-qt':'unsupported-qtwmp';}else if(!d||RE.iframe.test(url)){return'iframe';}
return'unsupported';};var handleClick=function(ev){var link;if(isLink(this)){link=this;}else{link=SL.getTarget(ev);while(!isLink(link)&&link.parentNode){link=link.parentNode;}}
if(link){SB.open(link);if(gallery.length)SL.preventDefault(ev);}};var toggleNav=function(id,on){var el=SL.get('sb-nav-'+id);if(el)el.style.display=on?'':'none';};var buildBars=function(cb){var obj=gallery[current],nav=SL.get('sb-nav'),counter=SL.get('sb-counter');SL.get('sb-title-inner').innerHTML=obj.title||'';if(nav){var c,n,pl,pa,p;if(options.displayNav){c=true;var len=gallery.length;if(len>1){if(options.continuous){n=p=true;}else{n=(len-1)>current;p=current>0;}}
if(options.slideshowDelay>0&&hasNext()){pa=slide_timer!='paused';pl=!pa;}}else{c=n=pl=pa=p=false;}
toggleNav('close',c);toggleNav('next',n);toggleNav('play',pl);toggleNav('pause',pa);toggleNav('previous',p);}
if(counter){var co='';if(options.displayCounter&&gallery.length>1){if(options.counterType=='skip'){var i=0,len=gallery.length,end=len;var limit=parseInt(options.counterLimit);if(limit<len&&limit>2){var h=Math.floor(limit/2);i=current-h;if(i<0)i+=len;end=current+(limit-h);if(end>len)end-=len;}
while(i!=end){if(i==len)i=0;co+='<a onclick="Shadowbox.change('+i+');"';if(i==current)co+=' class="sb-counter-current"';co+='>'+(++i)+'</a>';}}else{co=(current+1)+' '+SB.LANG.of+' '+len;}}
counter.innerHTML=co;}
cb();};var hideBars=function(anim,cb){var sw=SL.get('sb-wrapper'),st=SL.get('sb-title'),si=SL.get('sb-info'),ti=SL.get('sb-title-inner'),ii=SL.get('sb-info-inner'),t=parseInt(SL.getStyle(ti,'height'))||0,b=parseInt(SL.getStyle(ii,'height'))||0;var fn=function(){ti.style.visibility=ii.style.visibility='hidden';buildBars(cb);};if(anim){animate(st,'height',0,0.35);animate(si,'height',0,0.35);animate(sw,'paddingTop',t,0.35);animate(sw,'paddingBottom',b,0.35,fn);}else{st.style.height=si.style.height='0px';sw.style.paddingTop=t+'px';sw.style.paddingBottom=b+'px';fn();}};var showBars=function(cb){var sw=SL.get('sb-wrapper'),st=SL.get('sb-title'),si=SL.get('sb-info'),ti=SL.get('sb-title-inner'),ii=SL.get('sb-info-inner'),t=parseInt(SL.getStyle(ti,'height'))||0,b=parseInt(SL.getStyle(ii,'height'))||0;ti.style.visibility=ii.style.visibility='';if(ti.innerHTML!=''){animate(st,'height',t,0.35);animate(sw,'paddingTop',0,0.35);}
animate(si,'height',b,0.35);animate(sw,'paddingBottom',0,0.35,cb);};var loadContent=function(){var obj=gallery[current];if(!obj)return;var changing=false;if(content){content.remove();changing=true;}
var p=obj.player=='inline'?'html':obj.player;if(typeof SB[p]!='function'){SB.raise('Unknown player '+obj.player);}
content=new SB[p](content_id,obj);listenKeys(false);toggleLoading(true);hideBars(changing,function(){if(!content)return;if(!changing)SL.get('sb-wrapper').style.display='';var fn=function(){resizeContent(function(){if(!content)return;showBars(function(){if(!content)return;SL.get('sb-body-inner').innerHTML=SL.createHTML(content.markup(dims));toggleLoading(false,function(){if(!content)return;if(content.onLoad)content.onLoad();if(options.onFinish&&typeof options.onFinish=='function')options.onFinish(gallery[current]);if(slide_timer!='paused')SB.play();listenKeys(true);});});});};if(typeof content.ready!='undefined'){var id=setInterval(function(){if(content){if(content.ready){clearInterval(id);id=null;fn();}}else{clearInterval(id);id=null;}},100);}else{fn();}});if(gallery.length>1){var next=gallery[current+1]||gallery[0];if(next.player=='img'){var a=new Image();a.src=next.content;}
var prev=gallery[current-1]||gallery[gallery.length-1];if(prev.player=='img'){var b=new Image();b.src=prev.content;}}};var setDimensions=function(height,width,resizable){resizable=resizable||false;var sb=SL.get('sb-body'),sbi=SL.get('sb-body-inner')
sw=SL.get('sb-wrapper'),so=SL.get('sb-overlay'),h=height=parseInt(height),w=width=parseInt(width),view_h=so.offsetHeight,view_w=so.offsetWidth,pad=options.viewportPadding;var lr=sw.offsetWidth-sbi.offsetWidth,extra_x=2*pad+lr;if(w+extra_x>=view_w){w=view_w-extra_x;}
var tb=sw.offsetHeight-sbi.offsetHeight,extra_y=2*pad+tb;if(h+extra_y>=view_h){h=view_h-extra_y;}
var drag=false,resize_h=height,resize_w=width,handle=options.handleOversize;if(resizable&&(handle=='resize'||handle=='drag')){var change_h=(height-h)/height,change_w=(width-w)/width;if(handle=='resize'){if(change_h>change_w){w=Math.round((width/height)*h);}else if(change_w>change_h){h=Math.round((height/width)*w);}
resize_w=w;resize_h=h;}else{var link=gallery[current];if(link)drag=link.player=='img'&&(change_h>0||change_w>0);}}
dims={height:h+tb,width:w+lr,inner_h:h,inner_w:w,top:(view_h-(h+extra_y))/2+pad,left:(view_w-(w+extra_x))/2+pad,resize_h:resize_h,resize_w:resize_w,drag:drag};};var resizeContent=function(cb){if(!content)return;setDimensions(content.height,content.width,content.resizable);if(typeof cb=='function'){switch(options.animSequence){case'hw':adjustHeight(dims.inner_h,dims.top,true,function(){adjustWidth(dims.width,dims.left,true,cb);});break;case'wh':adjustWidth(dims.width,dims.left,true,function(){adjustHeight(dims.inner_h,dims.top,true,cb);});break;case'sync':default:adjustWidth(dims.width,dims.left,true);adjustHeight(dims.inner_h,dims.top,true,cb);}}else{adjustWidth(dims.width,dims.left,false);adjustHeight(dims.inner_h,dims.top,false);var c=SL.get(content_id);if(c){if(content.resizable&&options.handleOversize=='resize'){c.height=dims.resize_h;c.width=dims.resize_w;}
if(gallery[current].player=='img'&&options.handleOversize=='drag'){var top=parseInt(SL.getStyle(c,'top'));if(top+content.height<dims.inner_h){c.style.top=dims.inner_h-content.height+'px';}
var left=parseInt(SL.getStyle(c,'left'));if(left+content.width<dims.inner_w){c.style.left=dims.inner_w-content.width+'px';}}}}};var adjustHeight=function(height,top,anim,cb){var sb=SL.get('sb-body'),s=SL.get('sb-wrapper'),height=parseInt(height),top=parseInt(top);if(anim){animate(sb,'height',height,options.resizeDuration);animate(s,'top',top,options.resizeDuration,cb);}else{sb.style.height=height+'px';s.style.top=top+'px';if(cb)cb();}};var adjustWidth=function(width,left,anim,cb){var s=SL.get('sb-wrapper'),width=parseInt(width),left=parseInt(left);if(anim){animate(s,'width',width,options.resizeDuration);animate(s,'left',left,options.resizeDuration,cb);}else{s.style.width=width+'px';s.style.left=left+'px';if(cb)cb();}};var listenKeys=function(on){if(!options.enableKeys)return;SL[(on?'add':'remove')+'Event'](document,'keydown',handleKey);};var handleKey=function(e){var code=SL.keyCode(e);SL.preventDefault(e);if(code==81||code==88||code==27){SB.close();}else if(code==37){SB.previous();}else if(code==39){SB.next();}else if(code==32){SB[(typeof slide_timer=='number'?'pause':'play')]();}};var toggleLoading=function(on,cb){var ld=SL.get('sb-loading');if(!ld){if(cb)cb();return;}
if(on){ld.style.display='';if(cb)cb();}else{var p=gallery[current].player;var anim=(p=='img'||p=='html');var fn=function(){ld.style.display='none';clearOpacity(ld);if(cb)cb();};if(anim){animate(ld,'opacity',0,options.fadeDuration,fn);}else{fn();}}};var fixTop=function(){SL.get('sb-container').style.top=document.documentElement.scrollTop+'px';};var hasNext=function(){return gallery.length>1&&(current!=gallery.length-1||options.continuous);};var toggleVisible=function(cb){var on=!(cb),v=on?'visible':'hidden';if(!on){SL.each(['select','object','embed'],function(sel){SL.each(document.getElementsByTagName(sel),function(el){v_cache.push([el,SL.getStyle(el,'visibility')]);el.style.visibility=v;});});}else{SL.each(v_cache,function(c){c[0].style.visibility=c[1];});}
var so=SL.get('sb-overlay'),sc=SL.get('sb-container'),sb=SL.get('sb-wrapper');if(cb){if(ltIE7){fixTop();SL.addEvent(window,'scroll',fixTop);}
if(options.showOverlay){overlay_on=true;so.style.backgroundColor=options.overlayColor;SL.setOpacity(so,0);if(!options.modal)SL.addEvent(so,'click',SB.close);sb.style.display='none';}
sc.style.visibility='visible';if(overlay_on){animate(so,'opacity',parseFloat(options.overlayOpacity),options.fadeDuration,cb);}else{cb();}}else{SL.removeEvent(so,'click',SB.close);if(ltIE7)SL.removeEvent(window,'scroll',fixTop);if(overlay_on){sb.style.display='none';animate(so,'opacity',0,options.fadeDuration,function(){sc.style.visibility='hidden';sc.style.display=sb.style.display='';clearOpacity(so);});}else{sc.style.visibility='hidden';}}};Shadowbox.init=function(opts){if(initialized)return;if(typeof SB.LANG=='undefined'){SB.raise('No Shadowbox language loaded');return;}
if(typeof SB.SKIN=='undefined'){SB.raise('No Shadowbox skin loaded');return;}
if(SB.SKIN.options)apply(options,SB.SKIN.options);apply(options,opts||{});var markup=SB.SKIN.markup.replace(/\{(\w+)\}/g,function(m,p){return SB.LANG[p];});SL.append(document.body||document.documentElement,markup);if(ltIE7){SL.get('sb-body').style.zoom=1;var png=SB.SKIN.png;if(png&&png.constructor==Array){var el,m;SL.each(png,function(id){el=SL.get(id);if(el){m=SL.getStyle(el,'backgroundImage').match(/url\("(.*\.png)"\)/);if(m){el.style.backgroundImage='none';el.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src='+m[1]+',sizingMethod=scale);';}}});}}
for(var e in options.ext){RE[e]=new RegExp('\.('+options.ext[e].join('|')+')\s*$','i');}
var id;SL.addEvent(window,'resize',function(){if(id){clearTimeout(id);id=null;}
if(activated)id=setTimeout(resizeContent,50);});if(!options.skipSetup)SB.setup();initialized=true;};var include=function(script){document.write('<scr'+'ipt type="text/javascript" src="'+script+'"><\/script>');};Shadowbox.loadSkin=function(skin,dir){if(!(/\/$/.test(dir)))dir+='/';skin=dir+skin+'/';document.write('<link rel="stylesheet" type="text/css" href="'+skin+'skin.css">');include(skin+'skin.js');};Shadowbox.loadLanguage=function(lang,dir){if(!(/\/$/.test(dir)))dir+='/';include(dir+'shadowbox-'+lang+'.js');};Shadowbox.loadPlayer=function(players,dir){if(typeof players=='string')players=[players];if(!(/\/$/.test(dir)))dir+='/';SL.each(players,function(p){include(dir+'shadowbox-'+p+'.js');});};Shadowbox.setup=function(links,opts){if(!links){var links=[],rel;SL.each(document.getElementsByTagName('a'),function(a){rel=a.getAttribute('rel');if(rel&&RE.rel.test(rel))links.push(a);});}else if(!links.length){links=[links];}
SL.each(links,function(link){if(typeof link.shadowboxCacheKey=='undefined'){link.shadowboxCacheKey=cache.length;SL.addEvent(link,'click',handleClick);}
cache[link.shadowboxCacheKey]=this.buildCacheObj(link,opts);},this);};Shadowbox.buildCacheObj=function(link,opts){var href=link.href;var o={el:link,title:link.getAttribute('title'),player:getPlayer(href),options:apply({},opts||{}),content:href};SL.each(['player','title','height','width','gallery'],function(opt){if(typeof o.options[opt]!='undefined'){o[opt]=o.options[opt];delete o.options[opt];}});var rel=link.getAttribute('rel');if(rel){var match=rel.match(RE.gallery);if(match)o.gallery=escape(match[2]);SL.each(rel.split(';'),function(p){match=p.match(RE.param);if(match){if(match[1]=='options'){eval('apply(o.options, '+match[2]+')');}else{o[match[1]]=match[2];}}});}
return o;};Shadowbox.applyOptions=function(opts){if(opts){default_options=apply({},options);options=apply(options,opts);}};Shadowbox.revertOptions=function(){if(default_options){options=default_options;default_options=null;}};Shadowbox.open=function(obj,opts){this.revertOptions();if(isLink(obj)){if(typeof obj.shadowboxCacheKey=='undefined'||typeof cache[obj.shadowboxCacheKey]=='undefined'){obj=this.buildCacheObj(obj,opts);}else{obj=cache[obj.shadowboxCacheKey];}}
if(obj.constructor==Array){gallery=obj;current=0;}else{var copy=apply({},obj);if(!obj.gallery){gallery=[copy];current=0;}else{current=null;gallery=[];SL.each(cache,function(c){if(c.gallery&&c.gallery==obj.gallery){if(c.content==obj.content&&c.title==obj.title){current=gallery.length;}
gallery.push(apply({},c));}});if(current==null){gallery.unshift(copy);current=0;}}}
obj=gallery[current];if(obj.options||opts){this.applyOptions(apply(apply({},obj.options||{}),opts||{}));}
var match,r,s,a,oe=options.errors,msg,el;SL.each(gallery,function(g,i){r=false;if(g.player=='unsupported'){r=true;}else if(match=RE.unsupported.exec(g.player)){if(options.handleUnsupported=='link'){gallery[i].player='html';switch(match[1]){case'qtwmp':s='either';a=[oe.qt.url,oe.qt.name,oe.wmp.url,oe.wmp.name];break;case'qtf4m':s='shared';a=[oe.qt.url,oe.qt.name,oe.f4m.url,oe.f4m.name];break;default:s='single';if(match[1]=='swf'||match[1]=='flv')match[1]='fla';a=[oe[match[1]].url,oe[match[1]].name];}
msg=SB.LANG.errors[s].replace(/\{(\d+)\}/g,function(m,i){return a[i];});gallery[i].content='<div class="sb-message">'+msg+'</div>';}else{r=true;}}else if(g.player=='inline'){match=RE.inline.exec(g.content);if(match){if(el=SL.get(match[1])){gallery[i].content=el.innerHTML;}else{SB.raise('Cannot find element with id '+match[1]);}}else{SB.raise('Cannot find element id for inline content');}}
if(r){gallery.splice(i,1);if(i<current){--current;}else if(i==current){current=i>0?current-1:i;}
--i;len=gallery.length;}});if(gallery.length){if(options.onOpen&&typeof options.onOpen=='function')options.onOpen(obj);if(!activated){SL.get('sb-container').style.display='block';var h=options.autoDimensions&&'height'in obj?obj.height:options.initialHeight;var w=options.autoDimensions&&'width'in obj?obj.width:options.initialWidth;if(typeof SB.SKIN.render=='function')SB.SKIN.render(h,w);setDimensions(h,w);adjustHeight(dims.inner_h,dims.top,false);adjustWidth(dims.width,dims.left,false);toggleVisible(loadContent);}else{loadContent();}
activated=true;}};Shadowbox.change=function(num){if(!gallery)return;if(!gallery[num]){if(!options.continuous){return;}else{num=num<0?(gallery.length-1):0;}}
if(typeof slide_timer=='number'){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0;}
current=num;if(options.onChange&&typeof options.onChange=='function')options.onChange(gallery[current]);loadContent();};Shadowbox.next=function(){this.change(current+1);};Shadowbox.previous=function(){this.change(current-1);};Shadowbox.play=function(){if(!hasNext())return;if(!slide_delay)slide_delay=options.slideshowDelay*1000;if(slide_delay){slide_start=new Date().getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;SB.next();},slide_delay);toggleNav('play',false);toggleNav('pause',true);}};Shadowbox.pause=function(){if(typeof slide_timer=='number'){var time=new Date().getTime();slide_delay=Math.max(0,slide_delay-(time-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer='paused';}
toggleNav('pause',false);toggleNav('play',true);}};Shadowbox.close=function(){if(!activated)return;listenKeys(false);toggleVisible(false);if(content){content.remove();content=null;}
if(typeof slide_timer=='number')clearTimeout(slide_timer);slide_timer=null;slide_delay=0;if(options.onClose&&typeof options.onClose=='function')options.onClose(gallery[current]);activated=false;};Shadowbox.clearCache=function(){SL.each(cache,function(c){if(c.el){SL.removeEvent(c.el,'click',handleClick);try{delete c.el.shadowboxCacheKey;}catch(e){if(c.el.removeAttribute)c.el.removeAttribute('shadowboxCacheKey');}}});cache=[];};Shadowbox.getPlugins=function(){return plugins;};Shadowbox.getOptions=function(){return options;};Shadowbox.getCurrent=function(){return gallery[current];};Shadowbox.getVersion=function(){return version;};Shadowbox.getClient=function(){return client;};Shadowbox.getContent=function(){return content;};Shadowbox.getDimensions=function(){return dims;};Shadowbox.raise=function(e){if(typeof options.handleException=='function'){options.handleException(e);}else{throw e;}};})();
