/*! * 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("macintosh")>-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("safari")==-1;S.isWebKit=ua.indexOf("applewebkit/")>-1;var inlineId=/#(.+)$/,galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i;var open=false,initialized=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:{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"}};S.gallery=[];S.onReady=noop;S.path='http://blackfilm.com/web/wp-content/uploads/shadowbox-js/src/';S.player=null;S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=function(){return S.current>-1?S.gallery[S.current]:null};S.hasNext=function(){return 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.getElementsByTagName("script");for(var d=0,a=b.length;dm){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.tagName){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.content==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.player){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){return"flv"}if(S.qt&&S.qt.ext.indexOf(b)>-1){if(S.wmp&&S.wmp.ext.indexOf(b)>-1){return"qtwmp"}else{return"qt"}}if(S.wmp&&S.wmp.ext.indexOf(b)>-1){return"wmp"}}return"iframe"};function filterGallery(){var d=S.errorInfo,e=S.plugins,g,h,l,c,k,b,j,a;for(var f=0;f'+sprintf(S.lang.errors[k],b)+""}else{h=true}}else{if(g.player=="inline"){c=inlineId.exec(g.content);if(c){j=get(c[1]);if(j){g.content=j.innerHTML}else{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.hasFlashPlayerVersion(a)){g.width=310;g.height=177}}}}if(h){S.gallery.splice(f,1);if(f0?f-1:f}}--f}}}function listenKeys(a){if(!S.options.enableKeys){return}(a?addEvent:removeEvent)(document,"keydown",handleKey)}function handleKey(c){if(c.metaKey||c.shiftKey||c.altKey||c.ctrlKey){return}var b=keyCode(c),a;switch(b){case 81:case 88:case 27:a=S.close;break;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){listenKeys(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.revertOptions();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.gallery.length-1];if(g.player=="img"){var c=new Image();c.src=g.content}}S.skin.onLoad(i,waitReady)}function waitReady(){if(!open){return}if(typeof S.player.ready!="undefined"){var a=setInterval(function(){if(open){if(S.player.ready){clearInterval(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.body,S.dimensions);S.skin.onShow(finish)}function finish(){if(!open){return}if(S.player.onLoad){S.player.onLoad()}S.options.onFinish(S.getCurrent());if(!S.isPaused()){S.play()}listenKeys(true)};if(!Array.prototype.indexOf){Array.prototype.indexOf=function(b,c){var a=this.length>>>0;c=c||0;if(c<0){c+=a}for(;c-1;S.plugins={fla:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m&&names.indexOf("Windows Media")>-1,f4m:f4m}}else{var detectPlugin=function(a){var b;try{b=new ActiveXObject(a)}catch(c){}return !!b};S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("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("rel");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].nodeType){if(S.find){c=S.find(b[0],b[1])}}else{for(var d=0;d * Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis * This software is released under the MIT License * * Modified for inclusion in Shadowbox.js */ S.flash=(function(){var swfobject=function(){var UNDEF="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=window,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var ua=function(){var w3cdom=typeof doc.getElementById!=UNDEF&&typeof doc.getElementsByTagName!=UNDEF&&typeof doc.createElement!=UNDEF,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=UNDEF&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_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);playerVersion[1]=parseInt(d.replace(/^.*\.(.*)\s.*$/,"$1"),10);playerVersion[2]=/r/.test(d)?parseInt(d.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof win.ActiveXObject!=UNDEF){var a=null,fp6Crash=false;try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".7")}catch(e){try{a=new ActiveXObject(SHOCKWAVE_FLASH_AX+".6");playerVersion=[6,0,21];a.AllowScriptAccess="always"}catch(e){if(playerVersion[0]==6){fp6Crash=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=/webkit/.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("