/**
 * The Shadowbox class.
 *
 * This file is part of Shadowbox.
 *
 * Shadowbox is an online media viewer application that supports all of the
 * web's most popular media publishing formats. Shadowbox is written entirely
 * in JavaScript and CSS and is highly customizable. Using Shadowbox, website
 * authors can showcase a wide assortment of media in all major browsers without
 * navigating users away from the linking page.
 *
 * You should have received a license with this distribution explaining the terms
 * under which Shadowbox may be used. If you did not, you may obtain a copy of the
 * license at http://shadowbox-js.com/LICENSE
 *
 * @author      Michael J. I. Jackson <michael@mjijackson.com>
 * @copyright   2007-2009 Michael J. I. Jackson
 * @version     SVN: $Id: shadowbox.js 20M 2009-04-29 04:26:23Z (local) $
 */

/**
 * The Shadowbox class. Used to display different media on a web page using a
 * Lightbox-like effect.
 *
 * Known issues:
 *
 * - Location.toString exception in FF3 when loading Flash content into an
 *   iframe (such as a YouTube video). Known Flash bug, will not be fixed.
 *   http://bugs.adobe.com/jira/browse/FP-561
 *
 * Useful resources:
 *
 * - http://www.alistapart.com/articles/byebyeembed
 * - http://www.w3.org/TR/html401/struct/objects.html
 * - http://www.dyn-web.com/dhtml/iframes/
 * - http://www.apple.com/quicktime/player/specs.html
 * - http://www.apple.com/quicktime/tutorials/embed2.html
 * - http://www.howtocreate.co.uk/wrongWithIE/?chapter=navigator.plugins
 * - http://msdn.microsoft.com/en-us/library/ms532969.aspx
 * - http://support.microsoft.com/kb/316992
 * - http://www.alistapart.com/articles/flashembedcagematch
 */
var Shadowbox=function(){function finishContent(){if(!S.content)return;if(S.content.onLoad)S.content.onLoad();if(S.options.onFinish)S.options.onFinish();if(!S.isPaused())S.play();listenKeys(true)}function contentReady(){if(!S.content)return;S.content.append(S.skin.bodyEl(),content_id,S.dimensions);S.skin.onFinish(finishContent)}function loadContent(){var a=S.getCurrent();if(!a)return;var b=a.player=="inline"?"html":a.player;if(typeof S[b]!="function")throw"Unknown player: "+b;var c=false;if(S.content){S.content.remove();c=true;S.revertOptions();if(a.options)S.applyOptions(a.options)}U.removeChildren(S.skin.bodyEl());S.content=new S[b](a);listenKeys(false);S.skin.onLoad(S.content,c,function(){if(!S.content)return;if(typeof S.content.ready!="undefined"){var a=setInterval(function(){if(S.content){if(S.content.ready){clearInterval(a);a=null;S.skin.onReady(contentReady)}}else{clearInterval(a);a=null}},100)}else S.skin.onReady(contentReady)});if(S.gallery.length>1){var d=S.gallery[S.current+1]||S.gallery[0];if(d.player=="img"){var e=new Image;e.src=d.content}var f=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(f.player=="img"){var g=new Image;g.src=f.content}}}function handleKey(a){var b=S.lib.keyCode(a);S.lib.preventDefault(a);switch(b){case 81:case 88:case 27:S.close();break;case 37:S.previous();break;case 39:S.next();break;case 32:S[typeof slide_timer=="number"?"pause":"play"]()}}function listenKeys(a){if(!S.options.enableKeys)return;S.lib[(a?"add":"remove")+"Event"](document,"keydown",handleKey)}function handleClick(a){var b;if(U.isLink(this)){b=this}else{b=S.lib.getTarget(a);while(!U.isLink(b)&&b.parentNode)b=b.parentNode}if(b){var c=b.shadowboxCacheKey;if(typeof c!="undefined"&&typeof S.cache[c]!="undefined")b=S.cache[c];S.open(b);if(S.gallery.length)S.lib.preventDefault(a)}}function getPlayer(a){var b=S.regex,c=S.plugins,d=a.match(b.domain),e=d&&document.domain==d[1];if(a.indexOf("#")>-1&&e)return"inline";var f=a.indexOf("?");if(f>-1)a=a.substring(0,f);if(b.img.test(a))return"img";if(b.swf.test(a))return c.fla?"swf":"unsupported-swf";if(b.flv.test(a))return c.fla?"flv":"unsupported-flv";if(b.qt.test(a))return c.qt?"qt":"unsupported-qt";if(b.wmp.test(a)){if(c.wmp)return"wmp";if(c.f4m)return"qt";if(S.client.isMac)return c.qt?"unsupported-f4m":"unsupported-qtf4m";return"unsupported-wmp"}if(b.qtwmp.test(a)){if(c.qt)return"qt";if(c.wmp)return"wmp";return S.client.isMac?"unsupported-qt":"unsupported-qtwmp"}if(!e||b.iframe.test(a))return"iframe";return"unsupported"}var ua=navigator.userAgent.toLowerCase(),S={version:"3.0b",adapter:null,current:-1,gallery:[],cache:[],content:null,dimensions:null,plugins:null,path:"",options:{adapter:null,animate:true,animateFade:true,autoplayMovies:true,autoDimensions:false,continuous:false,counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,ease:function(a){return 1+Math.pow(a-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:.35,flashParams:{bgcolor:"#000000",allowFullScreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",initialHeight:160,initialWidth:320,language:"en",modal:false,onChange:null,onClose:null,onFinish:null,onOpen:null,overlayColor:"#000",overlayOpacity:.8,players:["img"],resizeDuration:.35,showOverlay:true,showMovieControls:true,skipSetup:false,slideshowDelay:0,useSizzle:true,viewportPadding:20},client:{isIE:ua.indexOf("msie")>-1,isIE6:ua.indexOf("msie 6")>-1,isIE7:ua.indexOf("msie 7")>-1,isGecko:ua.indexOf("gecko")>-1&&ua.indexOf("safari")==-1,isWebkit:ua.indexOf("applewebkit/")>-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},regex:{domain:/:\/\/(.*?)[:\/]/,inline:/#(.+)$/,rel:/^(light|shadow)box/i,gallery:/^(light|shadow)box\[(.*?)\]/i,unsupported:/^unsupported-(\w+)/,param:/\s*([a-z_]*?)\s*=\s*(.+)\s*/},libraries:{Prototype:"prototype",jQuery:"jquery",MooTools:"mootools",YAHOO:"yui",dojo:"dojo",Ext:"ext"},applyOptions:function(a){if(a){default_options=apply({},S.options);apply(S.options,a)}},buildCacheObj:function(link,opts){var href=link.href,obj={el:link,title:link.getAttribute("title"),options:apply({},opts||{}),content:href};each(["player","title","height","width","gallery"],function(a){if(typeof obj.options[a]!="undefined"){obj[a]=obj.options[a];delete obj.options[a]}});if(!obj.player)obj.player=getPlayer(href);var rel=link.getAttribute("rel");if(rel){var m=rel.match(S.regex.gallery);if(m)obj.gallery=escape(m[2]);each(rel.split(";"),function(p){m=p.match(S.regex.param);if(m){if(m[1]=="options")eval("apply(obj.options,"+m[2]+")");else obj[m[1]]=m[2]}})}return obj},change:function(a){if(!S.gallery)return;if(!S.gallery[a]){if(!S.options.continuous){return}else{a=a<0?S.gallery.length-1:0}}S.current=a;if(typeof slide_timer=="number"){clearTimeout(slide_timer);slide_timer=null;slide_delay=slide_start=0}if(S.options.onChange)S.options.onChange();loadContent()},clearCache:function(){each(S.cache,function(a){if(a.el)S.lib.removeEvent(a.el,"click",handleClick)});S.cache=[]},close:function(){if(!active)return;active=false;listenKeys(false);if(S.content){S.content.remove();S.content=null}if(typeof slide_timer=="number")clearTimeout(slide_timer);slide_timer=null;slide_delay=0;if(S.options.onClose)S.options.onClose();S.skin.onClose();S.revertOptions();each(v_cache,function(a){a[0].style.visibility=a[1]})},contentId:function(){return content_id},getCounter:function(){var a=S.gallery.length;if(S.options.counterType=="skip"){var b=[],c=0,d=a,e=parseInt(S.options.counterLimit)||0;if(e<a&&e>2){var f=Math.floor(e/2);c=S.current-f;if(c<0)c+=a;d=S.current+(e-f);if(d>a)d-=a}while(c!=d){if(c==a)c=0;b.push(c++)}}else var b=S.current+1+" "+S.lang.of+" "+a;return b},getCurrent:function(){return S.current>-1?S.gallery[S.current]:null},hasNext:function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous)},init:function(a){if(initialized)return;initialized=true;a=a||{};init_options=a;if(a)apply(S.options,a);for(var b in S.options.ext)S.regex[b]=new RegExp(".("+S.options.ext[b].join("|")+")s*$","i");if(!S.path){var c=/(.+)shadowbox\.js/i,d;each(document.getElementsByTagName("script"),function(a){if((d=c.exec(a.src))!=null){S.path=d[1];return false}})}if(S.options.adapter)S.adapter=S.options.adapter;else{for(var e in S.libraries){if(typeof window[e]!="undefined"){S.adapter=S.libraries[e];break}}if(!S.adapter)S.adapter="base"}if(S.options.useSizzle&&!window["Sizzle"])U.include(S.path+"libraries/sizzle/sizzle.js");if(!S.lang)U.include(S.path+"languages/shadowbox-"+S.options.language+".js");each(S.options.players,function(a){if((a=="swf"||a=="flv")&&!window["swfobject"])U.include(S.path+"libraries/swfobject/swfobject.js");if(!S[a])U.include(S.path+"players/shadowbox-"+a+".js")});if(!S.lib)U.include(S.path+"adapters/shadowbox-"+S.adapter+".js")},isActive:function(){return active},isPaused:function(){return slide_timer=="paused"},load:function(){if(S.skin.options){apply(S.options,S.skin.options);apply(S.options,init_options)}var a=S.skin.markup.replace(/\{(\w+)\}/g,function(a,b){return S.lang[b]});S.lib.append(document.body,a);if(S.skin.init)S.skin.init();var b;S.lib.addEvent(window,"resize",function(){if(b){clearTimeout(b);b=null}if(active){b=setTimeout(function(){if(S.skin.onWindowResize)S.skin.onWindowResize();var a=S.content;if(a&&a.onWindowResize)a.onWindowResize()},50)}});if(!S.options.skipSetup)S.setup()},next:function(){S.change(S.current+1)},open:function(a){if(U.isLink(a))a=S.buildCacheObj(a);if(a.constructor==Array){S.gallery=a;S.current=0}else{if(!a.gallery){S.gallery=[a];S.current=0}else{S.current=null;S.gallery=[];each(S.cache,function(b){if(b.gallery&&b.gallery==a.gallery){if(S.current==null&&b.content==a.content&&b.title==a.title)S.current=S.gallery.length;S.gallery.push(b)}});if(S.current==null){S.gallery.unshift(a);S.current=0}}}a=S.getCurrent();if(a.options){S.revertOptions();S.applyOptions(a.options)}var b,c,d,e,f,g=S.options.errors,h,i;for(var j=0;j<S.gallery.length;++j){b=S.gallery[j]=apply({},S.gallery[j]);c=false;if(b.player=="unsupported"){c=true}else if(d=S.regex.unsupported.exec(b.player)){if(S.options.handleUnsupported=="link"){b.player="html";switch(d[1]){case"qtwmp":e="either";f=[g.qt.url,g.qt.name,g.wmp.url,g.wmp.name];break;case"qtf4m":e="shared";f=[g.qt.url,g.qt.name,g.f4m.url,g.f4m.name];break;default:e="single";if(d[1]=="swf"||d[1]=="flv")d[1]="fla";f=[g[d[1]].url,g[d[1]].name]}h=S.lang.errors[e].replace(/\{(\d+)\}/g,function(a,b){return f[b]});b.content='<div class="sb-message">'+h+"</div>"}else c=true}else if(b.player=="inline"){d=S.regex.inline.exec(b.content);if(d){var i=U.get(d[1]);if(i)b.content=i.innerHTML;else throw"Cannot find element with id "+d[1]}else throw"Cannot find element id for inline content"}else if(b.player=="swf"||b.player=="flv"){var k=b.options&&b.options.flashVersion||S.options.flashVersion;if(!swfobject.hasFlashPlayerVersion(k)){b.width=310;b.height=177}}if(c){S.gallery.splice(j,1);if(j<S.current)--S.current;else if(j==S.current)S.current=j>0?j-1:j;--j}}if(S.gallery.length){if(!active){if(typeof S.options.onOpen=="function"&&S.options.onOpen(a)===false)return;v_cache=[];each(["select","object","embed","canvas"],function(a){each(document.getElementsByTagName(a),function(a){v_cache.push([a,a.style.visibility||"visible"]);a.style.visibility="hidden"})});var l=S.options.autoDimensions&&"height"in a?a.height:S.options.initialHeight;var m=S.options.autoDimensions&&"width"in a?a.width:S.options.initialWidth;S.skin.onOpen(l,m,loadContent)}else loadContent();active=true}},pause:function(){if(typeof slide_timer!="number")return;var a=(new Date).getTime();slide_delay=Math.max(0,slide_delay-(a-slide_start));if(slide_delay){clearTimeout(slide_timer);slide_timer="paused";if(S.skin.onPause)S.skin.onPause()}},play:function(){if(!S.hasNext())return;if(!slide_delay)slide_delay=S.options.slideshowDelay*1e3;if(slide_delay){slide_start=(new Date).getTime();slide_timer=setTimeout(function(){slide_delay=slide_start=0;S.next()},slide_delay);if(S.skin.onPlay)S.skin.onPlay()}},previous:function(){S.change(S.current-1)},revertOptions:function(){apply(S.options,default_options)},setDimensions:function(a,b,c,d,e,f,g){var h=a=parseInt(a),i=b=parseInt(b),j=parseInt(S.options.viewportPadding)||0;var k=2*j+e;if(h+k>=c)h=c-k;var l=2*j+f;if(i+l>=d)i=d-l;var m=a,n=b,o=(a-h)/a,p=(b-i)/b,q=o>0||p>0;if(g&&q&&S.options.handleOversize=="resize"){if(o>p)i=Math.round(b/a*h);else if(p>o)h=Math.round(a/b*i);n=i;m=h}S.dimensions={height:h+e,width:i+f,inner_h:h,inner_w:i,top:(c-(h+k))/2+j,left:(d-(i+l))/2+j,oversized:q,resize_h:m,resize_w:n};return S.dimensions},setup:function(a,b){if(!a){var a=[],c;each(document.getElementsByTagName("a"),function(b){c=b.getAttribute("rel");if(c&&S.regex.rel.test(c))a.push(b)})}else{var d=a.length;if(d){if(window["Sizzle"]){if(typeof a=="string")a=Sizzle(a);else if(d==2&&a.push&&typeof a[0]=="string"&&a[1].nodeType)a=Sizzle(a[0],a[1])}}else a=[a]}each(a,function(a){if(typeof a.shadowboxCacheKey=="undefined"){a.shadowboxCacheKey=S.cache.length;S.lib.addEvent(a,"click",handleClick)}S.cache[a.shadowboxCacheKey]=S.buildCacheObj(a,b)})}},U=S.util={animate:function(a,b,c,d,e){function i(c){var d=f+c*g;if(h)U.setOpacity(a,d);else a.style[b]=d+"px"}var f=parseFloat(S.lib.getStyle(a,b));if(isNaN(f))f=0;var g=c-f;if(g==0){if(e)e();return}var h=b=="opacity";if(!d||!h&&!S.options.animate||h&&!S.options.animateFade){i(1);if(e)e();return}d*=1e3;var j=(new Date).getTime(),k=j+d,l,m=setInterval(function(){l=(new Date).getTime();if(l>=k){clearInterval(m);i(1);if(e)e()}else i(S.options.ease((l-j)/d))},10)},apply:function(a,b){for(var c in b)a[c]=b[c];return a},clearOpacity:function(a){var b=a.style;if(window.ActiveXObject){if(typeof b.filter=="string"&&/alpha/i.test(b.filter))b.filter=b.filter.replace(/[\w\.]*alpha\(.*?\);?/i,"")}else b.opacity=""},each:function(a,b,c){for(var d=0,e=a.length;d<e;++d)if(b.call(c||a[d],a[d],d,a)===false)return},get:function(a){return document.getElementById(a)},include:function(){var a={};return function(b){if(a[b])return;a[b]=true;document.write("<scr"+'ipt type="text/javascript" src="'+b+'"></script>')}}(),isLink:function(a){if(!a||!a.tagName)return false;var b=a.tagName.toUpperCase();return b=="A"||b=="AREA"},removeChildren:function(a){while(a.firstChild)a.removeChild(a.firstChild)},setOpacity:function(a,b){var c=a.style;if(window.ActiveXObject){c.zoom=1;c.filter=(c.filter||"").replace(/\s*alpha\([^\)]*\)/gi,"")+(b==1?"":" alpha(opacity="+b*100+")")}else c.opacity=b}},apply=U.apply,each=U.each,init_options,initialized=false,default_options={},content_id="sb-content",active=false,slide_timer,slide_start,slide_delay=0,v_cache=[];if(navigator.plugins&&navigator.plugins.length){var names=[];each(navigator.plugins,function(a){names.push(a.name)});names=names.join();var detectPlugin=function(a){return names.indexOf(a)>-1};var f4m=detectPlugin("Flip4Mac");S.plugins={fla:detectPlugin("Shockwave Flash"),qt:detectPlugin("QuickTime"),wmp:!f4m&&detectPlugin("Windows Media"),f4m:f4m}}else{function detectPlugin(a){try{var b=new ActiveXObject(a)}catch(c){}return!!b}S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}return S}();Shadowbox.skin=function(){function o(c,d,e){var f=b.get("sb-body-inner");sw=b.get("sb-wrapper"),so=b.get("sb-overlay"),tb=sw.offsetHeight-f.offsetHeight,lr=sw.offsetWidth-f.offsetWidth,max_h=so.offsetHeight,max_w=so.offsetWidth;return a.setDimensions(c,d,max_h,max_w,tb,lr,e)}function n(b){var c=a.content;if(!c)return;var d=o(c.height,c.width,c.resizable);switch(a.options.animSequence){case"hw":l(d.inner_h,d.top,true,function(){m(d.width,d.left,true,b)});break;case"wh":m(d.width,d.left,true,function(){l(d.inner_h,d.top,true,b)});break;default:m(d.width,d.left,true);l(d.inner_h,d.top,true,b)}}function m(c,d,e,f){var g=b.get("sb-wrapper"),h=parseInt(c),i=parseInt(d);if(e){b.animate(g,"width",h,a.options.resizeDuration);b.animate(g,"left",i,a.options.resizeDuration,f)}else{g.style.width=h+"px";g.style.left=i+"px";if(f)f()}}function l(c,d,e,f){var g=b.get("sb-body"),h=b.get("sb-wrapper"),i=parseInt(c),j=parseInt(d);if(e){b.animate(g,"height",i,a.options.resizeDuration);b.animate(h,"top",j,a.options.resizeDuration,f)}else{g.style.height=i+"px";h.style.top=j+"px";if(f)f()}}function k(c){var d=b.get("sb-wrapper"),e=b.get("sb-title"),f=b.get("sb-info"),g=b.get("sb-title-inner"),h=b.get("sb-info-inner"),i=parseInt(a.lib.getStyle(g,"height"))||0,j=parseInt(a.lib.getStyle(h,"height"))||0;g.style.visibility=h.style.visibility="";if(g.innerHTML!=""){b.animate(e,"height",i,.35);b.animate(d,"paddingTop",0,.35)}b.animate(f,"height",j,.35);b.animate(d,"paddingBottom",0,.35,c)}function j(c,d){function m(){h.style.visibility=j.style.visibility="hidden";i(d)}var e=b.get("sb-wrapper"),f=b.get("sb-title"),g=b.get("sb-info"),h=b.get("sb-title-inner"),j=b.get("sb-info-inner"),k=parseInt(a.lib.getStyle(h,"height"))||0,l=parseInt(a.lib.getStyle(j,"height"))||0;if(c){b.animate(f,"height",0,.35);b.animate(g,"height",0,.35);b.animate(e,"paddingTop",k,.35);b.animate(e,"paddingBottom",l,.35,m)}else{f.style.height=g.style.height="0px";e.style.paddingTop=k+"px";e.style.paddingBottom=l+"px";m()}}function i(c){var d=a.getCurrent();b.get("sb-title-inner").innerHTML=d.title||"";var e,f,h,i,j;if(a.options.displayNav){e=true;var k=a.gallery.length;if(k>1){if(a.options.continuous)f=j=true;else{f=k-1>a.current;j=a.current>0}}if(a.options.slideshowDelay>0&&a.hasNext()){i=!a.isPaused();h=!i}}else{e=f=h=i=j=false}g("close",e);g("next",f);g("play",h);g("pause",i);g("previous",j);var e="";if(a.options.displayCounter&&a.gallery.length>1){var l=a.getCounter();if(typeof l=="string")e=l;else{b.each(l,function(b){e+='<a onclick="Shadowbox.change('+b+');"';if(b==a.current)e+=' class="sb-counter-current"';e+=">"+(b+1)+"</a>"})}}b.get("sb-counter").innerHTML=e;c()}function h(c,d){var e=b.get("sb-loading"),f=a.getCurrent().player,g=f=="img"||f=="html";if(c){function h(){b.clearOpacity(e);if(d)d()}b.setOpacity(e,0);e.style.display="";if(g)b.animate(e,"opacity",1,a.options.fadeDuration,h);else h()}else{function h(){e.style.display="none";b.clearOpacity(e);if(d)d()}if(g)b.animate(e,"opacity",0,a.options.fadeDuration,h);else h()}}function g(a,c){var d=b.get("sb-nav-"+a);if(d)d.style.display=c?"":"none"}function f(d){var f=b.get("sb-overlay"),g=b.get("sb-container"),h=b.get("sb-wrapper");if(d){if(a.client.isIE6){e();a.lib.addEvent(window,"scroll",e)}if(a.options.showOverlay){c=true;f.style.backgroundColor=a.options.overlayColor;b.setOpacity(f,0);if(!a.options.modal)a.lib.addEvent(f,"click",a.close);h.style.display="none"}g.style.visibility="visible";if(c){var i=parseFloat(a.options.overlayOpacity);b.animate(f,"opacity",i,a.options.fadeDuration,d)}else d()}else{if(a.client.isIE6)a.lib.removeEvent(window,"scroll",e);a.lib.removeEvent(f,"click",a.close);if(c){h.style.display="none";b.animate(f,"opacity",0,a.options.fadeDuration,function(){g.style.display="";h.style.display="";b.clearOpacity(f)})}else g.style.visibility="hidden"}}function e(){b.get("sb-container").style.top=document.documentElement.scrollTop+"px"}var a=Shadowbox,b=a.util,c=false,d=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"];return{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-body">'+'<div id="sb-body-inner"></div>'+'<div id="sb-loading">'+'<a onclick="Shadowbox.close()">{cancel}</a>'+"</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 style="clear:both"></div>'+"</div>"+"</div>"+"</div>"+"</div>",options:{animSequence:"sync"},init:function(){if(a.client.isIE6){b.get("sb-body").style.zoom=1;var c,e,f=/url\("(.*\.png)"\)/;b.each(d,function(d){c=b.get(d);if(c){e=a.lib.getStyle(c,"backgroundImage").match(f);if(e){c.style.backgroundImage="none";c.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+e[1]+",sizingMethod=scale);"}}})}},bodyEl:function(){return b.get("sb-body-inner")},onOpen:function(a,c,d){b.get("sb-container").style.display="block";var e=o(a,c);l(e.inner_h,e.top,false);m(e.width,e.left,false);f(d)},onLoad:function(a,c,d){h(true);j(c,function(){if(!a)return;if(!c)b.get("sb-wrapper").style.display="";d()})},onReady:function(a){n(function(){k(a)})},onFinish:function(a){h(false,a)},onClose:function(){f(false)},onPlay:function(){g("play",false);g("pause",true)},onPause:function(){g("pause",false);g("play",true)},onWindowResize:function(){var c=a.content;if(!c)return;var d=o(c.height,c.width,c.resizable);m(d.width,d.left,false);l(d.inner_h,d.top,false);var e=b.get(a.contentId());if(e){if(c.resizable&&a.options.handleOversize=="resize"){e.height=d.resize_h;e.width=d.resize_w}}}}}()
