/*shadowbox.js, version 3.0.3*/ (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(state){return 1+math.pow(state-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=null;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(options){lastoptions=apply({},s.options);apply(s.options,options)};s.revertoptions=function(){apply(s.options,lastoptions)};s.init=function(options,callback){if(initialized){return}initialized=true;if(s.skin.options){apply(s.options,s.skin.options)}if(options){apply(s.options,options)}if(!s.path){var path,scripts=document.getelementsbytagname("script");for(var i=0,len=scripts.length;imaxheight){height=maxheight-extraheight}var extrawidth=2*padding+leftright;if(width+extrawidth>maxwidth){width=maxwidth-extrawidth}var changeheight=(originalheight-height)/originalheight,changewidth=(originalwidth-width)/originalwidth,oversized=(changeheight>0||changewidth>0);if(preserveaspect&&oversized){if(changeheight>changewidth){width=math.round((originalwidth/originalheight)*height)}else{if(changewidth>changeheight){height=math.round((originalheight/originalwidth)*width)}}}s.dimensions={height:height+topbottom,width:width+leftright,innerheight:height,innerwidth:width,top:math.floor((maxheight-(height+extraheight))/2+padding),left:math.floor((maxwidth-(width+extrawidth))/2+padding),oversized:oversized};return s.dimensions};s.makegallery=function(obj){var gallery=[],current=-1;if(typeof obj=="string"){obj=[obj]}if(typeof obj.length=="number"){each(obj,function(i,o){if(o.content){gallery[i]=o}else{gallery[i]={content:o}}});current=0}else{if(obj.tagname){var cacheobj=s.getcache(obj);obj=cacheobj?cacheobj:s.makeobject(obj)}if(obj.gallery){gallery=[];var o;for(var key in s.cache){o=s.cache[key];if(o.gallery&&o.gallery==obj.gallery){if(current==-1&&o.content==obj.content){current=gallery.length}gallery.push(o)}}if(current==-1){gallery.unshift(obj);current=0}}else{gallery=[obj];current=0}}each(gallery,function(i,o){gallery[i]=apply({},o)});return[gallery,current]};s.makeobject=function(link,options){var obj={content:link.href,title:link.getattribute("title")||"",link:link};if(options){options=apply({},options);each(["player","title","height","width","gallery"],function(i,o){if(typeof options[o]!="undefined"){obj[o]=options[o];delete options[o]}});obj.options=options}else{obj.options={}}if(!obj.player){obj.player=s.getplayer(obj.content)}var rel=link.getattribute("rel");if(rel){var match=rel.match(galleryname);if(match){obj.gallery=escape(match[2])}each(rel.split(";"),function(i,p){match=p.match(inlineparam);if(match){obj[match[1]]=match[2]}})}return obj};s.getplayer=function(content){if(content.indexof("#")>-1&&content.indexof(document.location.href)==0){return"inline"}var q=content.indexof("?");if(q>-1){content=content.substring(0,q)}var ext,m=content.match(fileextension);if(m){ext=m[0].tolowercase()}if(ext){if(s.img&&s.img.ext.indexof(ext)>-1){return"img"}if(s.swf&&s.swf.ext.indexof(ext)>-1){return"swf"}if(s.flv&&s.flv.ext.indexof(ext)>-1){return"flv"}if(s.qt&&s.qt.ext.indexof(ext)>-1){if(s.wmp&&s.wmp.ext.indexof(ext)>-1){return"qtwmp"}else{return"qt"}}if(s.wmp&&s.wmp.ext.indexof(ext)>-1){return"wmp"}}return"iframe"};function filtergallery(){var err=s.errorinfo,plugins=s.plugins,obj,remove,needed,m,format,replace,inlineel,flashversion;for(var i=0;i'+sprintf(s.lang.errors[format],replace)+""}else{remove=true}}else{if(obj.player=="inline"){m=inlineid.exec(obj.content);if(m){inlineel=get(m[1]);if(inlineel){obj.content=inlineel.innerhtml}else{remove=true}}else{remove=true}}else{if(obj.player=="swf"||obj.player=="flv"){flashversion=(obj.options&&obj.options.flashversion)||s.options.flashversion;if(s.flash&&!s.flash.hasflashplayerversion(flashversion)){obj.width=310;obj.height=177}}}}if(remove){s.gallery.splice(i,1);if(i0?i-1:i}}--i}}}function listenkeys(on){if(!s.options.enablekeys){return}(on?addevent:removeevent)(document,"keydown",handlekey)}function handlekey(e){if(e.metakey||e.shiftkey||e.altkey||e.ctrlkey){return}var code=keycode(e),handler;switch(code){case 81:case 88:case 27:handler=s.close;break;case 37:handler=s.previous;break;case 39:handler=s.next;break;case 32:handler=typeof slidetimer=="number"?s.pause:s.play;break}if(handler){preventdefault(e);handler()}}function load(changing){listenkeys(false);var obj=s.getcurrent();var player=(obj.player=="inline"?"html":obj.player);if(typeof s[player]!="function"){throw"unknown player "+player}if(changing){s.player.remove();s.revertoptions();s.applyoptions(obj.options||{})}s.player=new s[player](obj,s.playerid);if(s.gallery.length>1){var next=s.gallery[s.current+1]||s.gallery[0];if(next.player=="img"){var a=new image();a.src=next.content}var prev=s.gallery[s.current-1]||s.gallery[s.gallery.length-1];if(prev.player=="img"){var b=new image();b.src=prev.content}}s.skin.onload(changing,waitready)}function waitready(){if(!open){return}if(typeof s.player.ready!="undefined"){var timer=setinterval(function(){if(open){if(s.player.ready){clearinterval(timer);timer=null;s.skin.onready(show)}}else{clearinterval(timer);timer=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(obj,from){var len=this.length>>>0;from=from||0;if(from<0){from+=len}for(;from-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(name){var axo;try{axo=new activexobject(name)}catch(e){}return !!axo};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(selector){var links=[];if(!selector){var rel;each(document.getelementsbytagname("a"),function(i,el){rel=el.getattribute("rel");if(rel&&relattr.test(rel)){links.push(el)}})}else{var length=selector.length;if(length){if(typeof selector=="string"){if(s.find){links=s.find(selector)}}else{if(length==2&&typeof selector[0]=="string"&&selector[1].nodetype){if(s.find){links=s.find(selector[0],selector[1])}}else{for(var i=0;i+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,tostring=object.prototype.tostring,hasduplicate=false,basehasduplicate=true;[0,0].sort(function(){basehasduplicate=false;return 0});var sizzle=function(selector,context,results,seed){results=results||[];var origcontext=context=context||document;if(context.nodetype!==1&&context.nodetype!==9){return[]}if(!selector||typeof selector!=="string"){return results}var parts=[],m,set,checkset,extra,prune=true,contextxml=isxml(context),sofar=selector;while((chunker.exec(""),m=chunker.exec(sofar))!==null){sofar=m[3];parts.push(m[1]);if(m[2]){extra=m[3];break}}if(parts.length>1&&origpos.exec(selector)){if(parts.length===2&&expr.relative[parts[0]]){set=posprocess(parts[0]+parts[1],context)}else{set=expr.relative[parts[0]]?[context]:sizzle(parts.shift(),context);while(parts.length){selector=parts.shift();if(expr.relative[selector]){selector+=parts.shift()}set=posprocess(selector,set)}}}else{if(!seed&&parts.length>1&&context.nodetype===9&&!contextxml&&expr.match.id.test(parts[0])&&!expr.match.id.test(parts[parts.length-1])){var ret=sizzle.find(parts.shift(),context,contextxml);context=ret.expr?sizzle.filter(ret.expr,ret.set)[0]:ret.set[0]}if(context){var ret=seed?{expr:parts.pop(),set:makearray(seed)}:sizzle.find(parts.pop(),parts.length===1&&(parts[0]==="~"||parts[0]==="+")&&context.parentnode?context.parentnode:context,contextxml);set=ret.expr?sizzle.filter(ret.expr,ret.set):ret.set;if(parts.length>0){checkset=makearray(set)}else{prune=false}while(parts.length){var cur=parts.pop(),pop=cur;if(!expr.relative[cur]){cur=""}else{pop=parts.pop()}if(pop==null){pop=context}expr.relative[cur](checkset,pop,contextxml)}}else{checkset=parts=[]}}if(!checkset){checkset=set}if(!checkset){throw"syntax error, unrecognized expression: "+(cur||selector)}if(tostring.call(checkset)==="[object array]"){if(!prune){results.push.apply(results,checkset)}else{if(context&&context.nodetype===1){for(var i=0;checkset[i]!=null;i++){if(checkset[i]&&(checkset[i]===true||checkset[i].nodetype===1&&contains(context,checkset[i]))){results.push(set[i])}}}else{for(var i=0;checkset[i]!=null;i++){if(checkset[i]&&checkset[i].nodetype===1){results.push(set[i])}}}}}else{makearray(checkset,results)}if(extra){sizzle(extra,origcontext,results,seed);sizzle.uniquesort(results)}return results};sizzle.uniquesort=function(results){if(sortorder){hasduplicate=basehasduplicate;results.sort(sortorder);if(hasduplicate){for(var i=1;i":function(checkset,part){var ispartstr=typeof part==="string";if(ispartstr&&!/\w/.test(part)){part=part.tolowercase();for(var i=0,l=checkset.length;i=0)){if(!inplace){result.push(elem)}}else{if(inplace){curloop[i]=false}}}}return false},id:function(match){return match[1].replace(/\\/g,"")},tag:function(match,curloop){return match[1].tolowercase()},child:function(match){if(match[1]==="nth"){var test=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(match[2]==="even"&&"2n"||match[2]==="odd"&&"2n+1"||!/\d/.test(match[2])&&"0n+"+match[2]||match[2]);match[2]=(test[1]+(test[2]||1))-0;match[3]=test[3]-0}match[0]=done++;return match},attr:function(match,curloop,inplace,result,not,isxml){var name=match[1].replace(/\\/g,"");if(!isxml&&expr.attrmap[name]){match[1]=expr.attrmap[name]}if(match[2]==="~="){match[4]=" "+match[4]+" "}return match},pseudo:function(match,curloop,inplace,result,not){if(match[1]==="not"){if((chunker.exec(match[3])||"").length>1||/^\w/.test(match[3])){match[3]=sizzle(match[3],null,null,curloop)}else{var ret=sizzle.filter(match[3],curloop,inplace,true^not);if(!inplace){result.push.apply(result,ret)}return false}}else{if(expr.match.pos.test(match[0])||expr.match.child.test(match[0])){return true}}return match},pos:function(match){match.unshift(true);return match}},filters:{enabled:function(elem){return elem.disabled===false&&elem.type!=="hidden"},disabled:function(elem){return elem.disabled===true},checked:function(elem){return elem.checked===true},selected:function(elem){elem.parentnode.selectedindex;return elem.selected===true},parent:function(elem){return !!elem.firstchild},empty:function(elem){return !elem.firstchild},has:function(elem,i,match){return !!sizzle(match[3],elem).length},header:function(elem){return/h\d/i.test(elem.nodename)},text:function(elem){return"text"===elem.type},radio:function(elem){return"radio"===elem.type},checkbox:function(elem){return"checkbox"===elem.type},file:function(elem){return"file"===elem.type},password:function(elem){return"password"===elem.type},submit:function(elem){return"submit"===elem.type},image:function(elem){return"image"===elem.type},reset:function(elem){return"reset"===elem.type},button:function(elem){return"button"===elem.type||elem.nodename.tolowercase()==="button"},input:function(elem){return/input|select|textarea|button/i.test(elem.nodename)}},setfilters:{first:function(elem,i){return i===0},last:function(elem,i,match,array){return i===array.length-1},even:function(elem,i){return i%2===0},odd:function(elem,i){return i%2===1},lt:function(elem,i,match){return imatch[3]-0},nth:function(elem,i,match){return match[3]-0===i},eq:function(elem,i,match){return match[3]-0===i}},filter:{pseudo:function(elem,match,i,array){var name=match[1],filter=expr.filters[name];if(filter){return filter(elem,i,match,array)}else{if(name==="contains"){return(elem.textcontent||elem.innertext||gettext([elem])||"").indexof(match[3])>=0}else{if(name==="not"){var not=match[3];for(var i=0,l=not.length;i=0)}}},id:function(elem,match){return elem.nodetype===1&&elem.getattribute("id")===match},tag:function(elem,match){return(match==="*"&&elem.nodetype===1)||elem.nodename.tolowercase()===match},class:function(elem,match){return(" "+(elem.classname||elem.getattribute("class"))+" ").indexof(match)>-1},attr:function(elem,match){var name=match[1],result=expr.attrhandle[name]?expr.attrhandle[name](elem):elem[name]!=null?elem[name]:elem.getattribute(name),value=result+"",type=match[2],check=match[4];return result==null?type==="!=":type==="="?value===check:type==="*="?value.indexof(check)>=0:type==="~="?(" "+value+" ").indexof(check)>=0:!check?value&&result!==false:type==="!="?value!==check:type==="^="?value.indexof(check)===0:type==="$="?value.substr(value.length-check.length)===check:type==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},pos:function(elem,match,i,array){var name=match[2],filter=expr.setfilters[name];if(filter){return filter(elem,i,match,array)}}}};var origpos=expr.match.pos;for(var type in expr.match){expr.match[type]=new regexp(expr.match[type].source+/(?![^\[]*\])(?![^\(]*\))/.source);expr.leftmatch[type]=new regexp(/(^(?:.|\r|\n)*?)/.source+expr.match[type].source)}var makearray=function(array,results){array=array.prototype.slice.call(array,0);if(results){results.push.apply(results,array);return results}return array};try{array.prototype.slice.call(document.documentelement.childnodes,0)}catch(e){makearray=function(array,results){var ret=results||[];if(tostring.call(array)==="[object array]"){array.prototype.push.apply(ret,array)}else{if(typeof array.length==="number"){for(var i=0,l=array.length;i";var root=document.documentelement;root.insertbefore(form,root.firstchild);if(document.getelementbyid(id)){expr.find.id=function(match,context,isxml){if(typeof context.getelementbyid!=="undefined"&&!isxml){var m=context.getelementbyid(match[1]);return m?m.id===match[1]||typeof m.getattributenode!=="undefined"&&m.getattributenode("id").nodevalue===match[1]?[m]:undefined:[]}};expr.filter.id=function(elem,match){var node=typeof elem.getattributenode!=="undefined"&&elem.getattributenode("id");return elem.nodetype===1&&node&&node.nodevalue===match}}root.removechild(form);root=form=null})();(function(){var div=document.createelement("div");div.appendchild(document.createcomment(""));if(div.getelementsbytagname("*").length>0){expr.find.tag=function(match,context){var results=context.getelementsbytagname(match[1]);if(match[1]==="*"){var tmp=[];for(var i=0;results[i];i++){if(results[i].nodetype===1){tmp.push(results[i])}}results=tmp}return results}}div.innerhtml="";if(div.firstchild&&typeof div.firstchild.getattribute!=="undefined"&&div.firstchild.getattribute("href")!=="#"){expr.attrhandle.href=function(elem){return elem.getattribute("href",2)}}div=null})();if(document.queryselectorall){(function(){var oldsizzle=sizzle,div=document.createelement("div");div.innerhtml="

";if(div.queryselectorall&&div.queryselectorall(".test").length===0){return}sizzle=function(query,context,extra,seed){context=context||document;if(!seed&&context.nodetype===9&&!isxml(context)){try{return makearray(context.queryselectorall(query),extra)}catch(e){}}return oldsizzle(query,context,extra,seed)};for(var prop in oldsizzle){sizzle[prop]=oldsizzle[prop]}div=null})()}(function(){var div=document.createelement("div");div.innerhtml="
";if(!div.getelementsbyclassname||div.getelementsbyclassname("e").length===0){return}div.lastchild.classname="e";if(div.getelementsbyclassname("e").length===1){return}expr.order.splice(1,0,"class");expr.find.class=function(match,context,isxml){if(typeof context.getelementsbyclassname!=="undefined"&&!isxml){return context.getelementsbyclassname(match[1])}};div=null})();function dirnodecheck(dir,cur,donename,checkset,nodecheck,isxml){for(var i=0,l=checkset.length;i0){match=elem;break}}}elem=elem[dir]}checkset[i]=match}}}var contains=document.comparedocumentposition?function(a,b){return a.comparedocumentposition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var isxml=function(elem){var documentelement=(elem?elem.ownerdocument||elem:0).documentelement;return documentelement?documentelement.nodename!=="html":false};var posprocess=function(selector,context){var tmpset=[],later="",match,root=context.nodetype?[context]:context;while((match=expr.match.pseudo.exec(selector))){later+=match[0];selector=selector.replace(expr.match.pseudo,"")}selector=expr.relative[selector]?selector+"*":selector;for(var i=0,l=root.length;i * 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("