(function(a5,bt){var bF={version:"3.0.3"};var bs=navigator.userAgent.toLowerCase();if(bs.indexOf("windows")>-1||bs.indexOf("win32")>-1){bF.isWindows=true}else{if(bs.indexOf("macintosh")>-1||bs.indexOf("mac os x")>-1){bF.isMac=true}else{if(bs.indexOf("linux")>-1){bF.isLinux=true}}}bF.isIE=bs.indexOf("msie")>-1;bF.isIE6=bs.indexOf("msie 6")>-1;bF.isIE7=bs.indexOf("msie 7")>-1;bF.isGecko=bs.indexOf("gecko")>-1&&bs.indexOf("safari")==-1;bF.isWebKit=bs.indexOf("applewebkit/")>-1;var aI=/#(.+)$/,aQ=/^(light|shadow)box\[(.*?)\]/i,ba=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,bj=/[0-9a-z]+$/i,aN=/(.+\/)shadowbox\.js/i;var S=false,K=false,bu={},bV=0,bH,a1;bF.current=-1;bF.dimensions=null;bF.ease=function(a){return 1+Math.pow(a-1,3)};bF.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"}};bF.gallery=[];bF.onReady=aV;bF.path=null;bF.player=null;bF.playerId="sb-player";bF.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:aV,onClose:aV,onFinish:aV,onOpen:aV,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};bF.getCurrent=function(){return bF.current>-1?bF.gallery[bF.current]:null};bF.hasNext=function(){return bF.gallery.length>1&&(bF.current!=bF.gallery.length-1||bF.options.continuous)};bF.isOpen=function(){return S};bF.isPaused=function(){return a1=="pause"};bF.applyOptions=function(a){bu=aL({},bF.options);aL(bF.options,a)};bF.revertOptions=function(){aL(bF.options,bu)};bF.init=function(a,d){if(K){return}K=true;if(bF.skin.options){aL(bF.options,bF.skin.options)}if(a){aL(bF.options,a)}if(!bF.path){var c,f=document.getElementsByTagName("script");for(var b=0,e=f.length;b<e;++b){c=aN.exec(f[b].src);if(c){bF.path=c[1];break}}}if(d){bF.onReady=d}bD()};bF.open=function(b){if(S){return}var a=bF.makeGallery(b);bF.gallery=a[0];bF.current=a[1];b=bF.getCurrent();if(b==null){return}bF.applyOptions(b.options||{});bm();if(bF.gallery.length){b=bF.getCurrent();if(bF.options.onOpen(b)===false){return}S=true;bF.skin.onOpen(b,bd)}};bF.close=function(){if(!S){return}S=false;if(bF.player){bF.player.remove();bF.player=null}if(typeof a1=="number"){clearTimeout(a1);a1=null}bV=0;a2(false);bF.options.onClose(bF.getCurrent());bF.skin.onClose();bF.revertOptions()};bF.play=function(){if(!bF.hasNext()){return}if(!bV){bV=bF.options.slideshowDelay*1000}if(bV){bH=a7();a1=setTimeout(function(){bV=bH=0;bF.next()},bV);if(bF.skin.onPlay){bF.skin.onPlay()}}};bF.pause=function(){if(typeof a1!="number"){return}bV=Math.max(0,bV-(a7()-bH));if(bV){clearTimeout(a1);a1="pause";if(bF.skin.onPause){bF.skin.onPause()}}};bF.change=function(a){if(!(a in bF.gallery)){if(bF.options.continuous){a=(a<0?bF.gallery.length+a:0);if(!(a in bF.gallery)){return}}else{return}}bF.current=a;if(typeof a1=="number"){clearTimeout(a1);a1=null;bV=bH=0}bF.options.onChange(bF.getCurrent());bd(true)};bF.next=function(){bF.change(bF.current+1)};bF.previous=function(){bF.change(bF.current-1)};bF.setDimensions=function(m,d,k,l,c,n,i,f){var h=m,b=d;var g=2*i+c;if(m+g>k){m=k-g}var a=2*i+n;if(d+a>l){d=l-a}var o=(h-m)/h,j=(b-d)/b,e=(o>0||j>0);if(f&&e){if(o>j){d=Math.round((b/h)*m)}else{if(j>o){m=Math.round((h/b)*d)}}}bF.dimensions={height:m+c,width:d+n,innerHeight:m,innerWidth:d,top:Math.floor((k-(m+g))/2+i),left:Math.floor((l-(d+a))/2+i),oversized:e};return bF.dimensions};bF.makeGallery=function(c){var e=[],b=-1;if(typeof c=="string"){c=[c]}if(typeof c.length=="number"){aR(c,function(g,h){if(h.content){e[g]=h}else{e[g]={content:h}}});b=0}else{if(c.tagName){var f=bF.getCache(c);c=f?f:bF.makeObject(c)}if(c.gallery){e=[];var d;for(var a in bF.cache){d=bF.cache[a];if(d.gallery&&d.gallery==c.gallery){if(b==-1&&d.content==c.content){b=e.length}e.push(d)}}if(b==-1){e.unshift(c);b=0}}else{e=[c];b=0}}aR(e,function(g,h){e[g]=aL({},h)});return[e,b]};bF.makeObject=function(b,a){var c={content:b.href,title:b.getAttribute("title")||"",link:b};if(a){a=aL({},a);aR(["player","title","height","width","gallery"],function(f,g){if(typeof a[g]!="undefined"){c[g]=a[g];delete a[g]}});c.options=a}else{c.options={}}if(!c.player){c.player=bF.getPlayer(c.content)}var d=b.getAttribute("rel");if(d){var e=d.match(aQ);if(e){c.gallery=escape(e[2])}aR(d.split(";"),function(f,g){e=g.match(ba);if(e){c[e[1]]=e[2]}})}return c};bF.getPlayer=function(a){if(a.indexOf("#")>-1&&a.indexOf(document.location.href)==0){return"inline"}var b=a.indexOf("?");if(b>-1){a=a.substring(0,b)}var d,c=a.match(bj);if(c){d=c[0].toLowerCase()}if(d){if(bF.img&&bF.img.ext.indexOf(d)>-1){return"img"}if(bF.swf&&bF.swf.ext.indexOf(d)>-1){return"swf"}if(bF.flv&&bF.flv.ext.indexOf(d)>-1){return"flv"}if(bF.qt&&bF.qt.ext.indexOf(d)>-1){if(bF.wmp&&bF.wmp.ext.indexOf(d)>-1){return"qtwmp"}else{return"qt"}}if(bF.wmp&&bF.wmp.ext.indexOf(d)>-1){return"wmp"}}return"iframe"};function bm(){var b=bF.errorInfo,c=bF.plugins,e,f,i,a,h,k,g,j;for(var d=0;d<bF.gallery.length;++d){e=bF.gallery[d];f=false;i=null;switch(e.player){case"flv":case"swf":if(!c.fla){i="fla"}break;case"qt":if(!c.qt){i="qt"}break;case"wmp":if(bF.isMac){if(c.qt&&c.f4m){e.player="qt"}else{i="qtf4m"}}else{if(!c.wmp){i="wmp"}}break;case"qtwmp":if(c.qt){e.player="qt"}else{if(c.wmp){e.player="wmp"}else{i="qtwmp"}}break}if(i){if(bF.options.handleUnsupported=="link"){switch(i){case"qtf4m":h="shared";k=[b.qt.url,b.qt.name,b.f4m.url,b.f4m.name];break;case"qtwmp":h="either";k=[b.qt.url,b.qt.name,b.wmp.url,b.wmp.name];break;default:h="single";k=[b[i].url,b[i].name]}e.player="html";e.content='<div class="sb-message">'+bI(bF.lang.errors[h],k)+"</div>"}else{f=true}}else{if(e.player=="inline"){a=aI.exec(e.content);if(a){g=aM(a[1]);if(g){e.content=g.innerHTML}else{f=true}}else{f=true}}else{if(e.player=="swf"||e.player=="flv"){j=(e.options&&e.options.flashVersion)||bF.options.flashVersion;if(bF.flash&&!bF.flash.hasFlashPlayerVersion(j)){e.width=310;e.height=177}}}}if(f){bF.gallery.splice(d,1);if(d<bF.current){--bF.current}else{if(d==bF.current){bF.current=d>0?d-1:d}}--d}}}function a2(a){if(!bF.options.enableKeys){return}(a?bk:bx)(document,"keydown",aZ)}function aZ(a){if(a.metaKey||a.shiftKey||a.altKey||a.ctrlKey){return}var c=bN(a),b;switch(c){case 81:case 88:case 27:b=bF.close;break;case 37:b=bF.previous;break;case 39:b=bF.next;break;case 32:b=typeof a1=="number"?bF.pause:bF.play;break}if(b){by(a);b()}}function bd(e){a2(false);var d=bF.getCurrent();var a=(d.player=="inline"?"html":d.player);if(typeof bF[a]!="function"){throw"unknown player "+a}if(e){bF.player.remove();bF.revertOptions();bF.applyOptions(d.options||{})}bF.player=new bF[a](d,bF.playerId);if(bF.gallery.length>1){var b=bF.gallery[bF.current+1]||bF.gallery[0];if(b.player=="img"){var g=new Image();g.src=b.content}var c=bF.gallery[bF.current-1]||bF.gallery[bF.gallery.length-1];if(c.player=="img"){var f=new Image();f.src=c.content}}bF.skin.onLoad(e,bQ)}function bQ(){if(!S){return}if(typeof bF.player.ready!="undefined"){var a=setInterval(function(){if(S){if(bF.player.ready){clearInterval(a);a=null;bF.skin.onReady(bh)}}else{clearInterval(a);a=null}},10)}else{bF.skin.onReady(bh)}}function bh(){if(!S){return}bF.player.append(bF.skin.body,bF.dimensions);bF.skin.onShow(bq)}function bq(){if(!S){return}if(bF.player.onLoad){bF.player.onLoad()}bF.options.onFinish(bF.getCurrent());if(!bF.isPaused()){bF.play()}a2(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(c,a){var b=this.length>>>0;a=a||0;if(a<0){a+=b}for(;a<b;++a){if(a in this&&this[a]===c){return a}}return -1}}function a7(){return(new Date).getTime()}function aL(b,a){for(var c in a){b[c]=a[c]}return b}function aR(b,c){var e=0,d=b.length;for(var a=b[0];e<d&&c.call(a,e,a)!==false;a=b[++e]){}}function bI(b,a){return b.replace(/\{(\w+?)\}/g,function(c,d){return a[d]})}function aV(){}function aM(a){return document.getElementById(a)}function be(a){a.parentNode.removeChild(a)}var bn=true,bR=true;function bf(){var a=document.body,b=document.createElement("div");bn=typeof b.style.opacity==="string";b.style.position="fixed";b.style.margin=0;b.style.top="20px";a.appendChild(b,a.firstChild);bR=b.offsetTop==20;a.removeChild(b)}bF.getStyle=(function(){var a=/opacity=([^)]*)/,b=document.defaultView&&document.defaultView.getComputedStyle;return function(f,e){var d;if(!bn&&e=="opacity"&&f.currentStyle){d=a.test(f.currentStyle.filter||"")?(parseFloat(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}})();bF.appendHTML=function(a,d){if(a.insertAdjacentHTML){a.insertAdjacentHTML("BeforeEnd",d)}else{if(a.lastChild){var c=a.ownerDocument.createRange();c.setStartAfter(a.lastChild);var b=c.createContextualFragment(d);a.appendChild(b)}else{a.innerHTML=d}}};bF.getWindowSize=function(a){if(document.compatMode==="CSS1Compat"){return document.documentElement["client"+a]}return document.body["client"+a]};bF.setOpacity=function(a,b){var c=a.style;if(bn){c.opacity=(b==1?"":b)}else{c.zoom=1;if(b==1){if(typeof c.filter=="string"&&(/alpha/i).test(c.filter)){c.filter=c.filter.replace(/\s*[\w\.]*alpha\([^\)]*\);?/gi,"")}}else{c.filter=(c.filter||"").replace(/\s*[\w\.]*alpha\([^\)]*\)/gi,"")+" alpha(opacity="+(b*100)+")"}}};bF.clearOpacity=function(a){bF.setOpacity(a,1)};function bA(a){return a.target}function bO(a){return[a.pageX,a.pageY]}function by(a){a.preventDefault()}function bN(a){return a.keyCode}function bk(a,c,b){jQuery(a).bind(c,b)}function bx(a,c,b){jQuery(a).unbind(c,b)}jQuery.fn.shadowbox=function(a){return this.each(function(){var b=jQuery(this);var c=jQuery.extend({},a||{},jQuery.metadata?b.metadata():jQuery.meta?b.data():{});var d=this.className||"";c.width=parseInt((d.match(/w:(\d+)/)||[])[1])||c.width;c.height=parseInt((d.match(/h:(\d+)/)||[])[1])||c.height;Shadowbox.setup(b,c)})};var bT=false,aX;if(document.addEventListener){aX=function(){document.removeEventListener("DOMContentLoaded",aX,false);bF.load()}}else{if(document.attachEvent){aX=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",aX);bF.load()}}}}function bl(){if(bT){return}try{document.documentElement.doScroll("left")}catch(a){setTimeout(bl,1);return}bF.load()}function bD(){if(document.readyState==="complete"){return bF.load()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",aX,false);a5.addEventListener("load",bF.load,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",aX);a5.attachEvent("onload",bF.load);var a=false;try{a=a5.frameElement===null}catch(b){}if(document.documentElement.doScroll&&a){bl()}}}}bF.load=function(){if(bT){return}if(!document.body){return setTimeout(bF.load,13)}bT=true;bf();bF.onReady();if(!bF.options.skipSetup){bF.setup()}bF.skin.init()};bF.plugins={};if(navigator.plugins&&navigator.plugins.length){var bP=[];aR(navigator.plugins,function(a,b){bP.push(b.name)});bP=bP.join(",");var aU=bP.indexOf("Flip4Mac")>-1;bF.plugins={fla:bP.indexOf("Shockwave Flash")>-1,qt:bP.indexOf("QuickTime")>-1,wmp:!aU&&bP.indexOf("Windows Media")>-1,f4m:aU}}else{var bC=function(b){var c;try{c=new ActiveXObject(b)}catch(a){}return !!c};bF.plugins={fla:bC("ShockwaveFlash.ShockwaveFlash"),qt:bC("QuickTime.QuickTime"),wmp:bC("wmplayer.ocx"),f4m:false}}var bS=/^(light|shadow)box/i,aY="shadowboxCacheKey",bb=1;bF.cache={};bF.select=function(e){var a=[];if(!e){var d;aR(document.getElementsByTagName("a"),function(f,g){d=g.getAttribute("rel");if(d&&bS.test(d)){a.push(g)}})}else{var c=e.length;if(c){if(typeof e=="string"){if(bF.find){a=bF.find(e)}}else{if(c==2&&typeof e[0]=="string"&&e[1].nodeType){if(bF.find){a=bF.find(e[0],e[1])}}else{for(var b=0;b<c;++b){a[b]=e[b]}}}}else{a.push(e)}}return a};bF.setup=function(a,b){aR(bF.select(a),function(c,d){bF.addCache(d,b)})};bF.teardown=function(a){aR(bF.select(a),function(c,b){bF.removeCache(b)})};bF.addCache=function(a,b){var c=a[aY];if(c==bt){c=bb++;a[aY]=c;bk(a,"click",bL)}bF.cache[c]=bF.makeObject(a,b)};bF.removeCache=function(a){bx(a,"click",bL);delete bF.cache[a[aY]];a[aY]=null};bF.getCache=function(b){var a=b[aY];return(a in bF.cache&&bF.cache[a])};bF.clearCache=function(){for(var a in bF.cache){bF.removeCache(bF.cache[a].link)}bF.cache={}};function bL(a){bF.open(this);if(bF.gallery.length){by(a)}}bF.lang={code:"en",of:"of",loading:"loading",cancel:"Cancel",next:"Next",previous:"Previous",play:"Play",pause:"Pause",close:"Close",errors:{single:'You must install the <a href="{0}">{1}</a> browser plugin to view this content.',shared:'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 href="{0}">{1}</a> or the <a href="{2}">{3}</a> browser plugin to view this content.'}};var bg,a4="sb-drag-proxy",bi,br,aS;function a8(){bi={x:0,y:0,startX:null,startY:null}}function aH(){var a=bF.dimensions;aL(br.style,{height:a.innerHeight+"px",width:a.innerWidth+"px"})}function bB(){a8();var a=["position:absolute","cursor:"+(bF.isGecko?"-moz-grab":"move"),"background-color:"+(bF.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");bF.appendHTML(bF.skin.body,'<div id="'+a4+'" style="'+a+'"></div>');br=aM(a4);aH();bk(br,"mousedown",bv)}function bc(){if(br){bx(br,"mousedown",bv);be(br);br=null}aS=null}function bv(b){by(b);var a=bO(b);bi.startX=a[0];bi.startY=a[1];aS=aM(bF.player.id);bk(document,"mousemove",bo);bk(document,"mouseup",bp);if(bF.isGecko){br.style.cursor="-moz-grabbing"}}function bo(c){var e=bF.player,d=bF.dimensions,b=bO(c);var a=b[0]-bi.startX;bi.startX+=a;bi.x=Math.max(Math.min(0,bi.x+a),d.innerWidth-e.width);var f=b[1]-bi.startY;bi.startY+=f;bi.y=Math.max(Math.min(0,bi.y+f),d.innerHeight-e.height);aL(aS.style,{left:bi.x+"px",top:bi.y+"px"})}function bp(){bx(document,"mousemove",bo);bx(document,"mouseup",bp);if(bF.isGecko){br.style.cursor="-moz-grab"}}bF.img=function(c,a){this.obj=c;this.id=a;this.ready=false;var b=this;bg=new Image();bg.onload=function(){b.height=c.height?parseInt(c.height,10):bg.height;b.width=c.width?parseInt(c.width,10):bg.width;b.ready=true;bg.onload=null;bg=null};bg.src=c.content};bF.img.ext=["bmp","gif","jpg","jpeg","png"];bF.img.prototype={append:function(e,c){var a=document.createElement("img");a.id=this.id;a.src=this.obj.content;a.style.position="absolute";var d,b;if(c.oversized&&bF.options.handleOversize=="resize"){d=c.innerHeight;b=c.innerWidth}else{d=this.height;b=this.width}a.setAttribute("height",d);a.setAttribute("width",b);e.appendChild(a)},remove:function(){var a=aM(this.id);if(a){be(a)}bc();if(bg){bg.onload=null;bg=null}},onLoad:function(){var a=bF.dimensions;if(a.oversized&&bF.options.handleOversize=="drag"){bB()}},onWindowResize:function(){var b=bF.dimensions;switch(bF.options.handleOversize){case"resize":var c=aM(this.id);c.height=b.innerHeight;c.width=b.innerWidth;break;case"drag":if(aS){var a=parseInt(bF.getStyle(aS,"top")),d=parseInt(bF.getStyle(aS,"left"));if(a+this.height<b.innerHeight){aS.style.top=b.innerHeight-this.height+"px"}if(d+this.width<b.innerWidth){aS.style.left=b.innerWidth-this.width+"px"}aH()}break}}};bF.iframe=function(c,a){this.obj=c;this.id=a;var b=aM("sb-overlay");this.height=c.height?parseInt(c.height,10):b.offsetHeight;this.width=c.width?parseInt(c.width,10):b.offsetWidth};bF.iframe.prototype={append:function(b,a){var c='<iframe id="'+this.id+'" name="'+this.id+'" height="100%" width="100%" frameborder="0" marginwidth="0" marginheight="0" style="visibility:hidden" onload="this.style.visibility=\'visible\'" scrolling="auto"';if(bF.isIE){c+=' allowtransparency="true"';if(bF.isIE6){c+=" src=\"javascript:false;document.write('');\""}}c+="></iframe>";b.innerHTML=c},remove:function(){var a=aM(this.id);if(a){be(a);if(bF.isGecko){delete a5.frames[this.id]}}},onLoad:function(){var a=bF.isIE?aM(this.id).contentWindow:a5.frames[this.id];a.location.href=this.obj.content}};bF.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};bF.html.prototype={append:function(b,c){var a=document.createElement("div");a.id=this.id;a.className="html";a.innerHTML=this.obj.content;b.appendChild(a)},remove:function(){var a=aM(this.id);if(a){be(a)}}};var a0=false,bU=[],bE=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],aG,aO,bW,bw=true;function bz(a,k,h,f,l){var m=(k=="opacity"),g=m?bF.setOpacity:function(o,p){o.style[k]=""+p+"px"};if(f==0||(!m&&!bF.options.animate)||(m&&!bF.options.animateFade)){g(a,h);if(l){l()}return}var i=parseFloat(bF.getStyle(a,k))||0;var j=h-i;if(j==0){if(l){l()}return}f*=1000;var b=a7(),e=bF.ease,d=b+f,c;var n=setInterval(function(){c=a7();if(c>=d){clearInterval(n);n=null;g(a,h);if(l){l()}}else{g(a,i+e((c-b)/f)*j)}},10)}function aJ(){aG.style.height=bF.getWindowSize("Height")+"px";aG.style.width=bF.getWindowSize("Width")+"px"}function aP(){aG.style.top=document.documentElement.scrollTop+"px";aG.style.left=document.documentElement.scrollLeft+"px"}function a9(a){if(a){aR(bU,function(c,b){b[0].style.visibility=b[1]||""})}else{bU=[];aR(bF.options.troubleElements,function(b,c){aR(document.getElementsByTagName(c),function(d,e){bU.push([e,e.style.visibility]);e.style.visibility="hidden"})})}}function bG(a,b){var c=aM("sb-nav-"+a);if(c){c.style.display=b?"":"none"}}function aT(e,d){var c=aM("sb-loading"),a=bF.getCurrent().player,b=(a=="img"||a=="html");if(e){bF.setOpacity(c,0);c.style.display="block";var f=function(){bF.clearOpacity(c);if(d){d()}};if(b){bz(c,"opacity",1,bF.options.fadeDuration,f)}else{f()}}else{var f=function(){c.style.display="none";bF.clearOpacity(c);if(d){d()}};if(b){bz(c,"opacity",0,bF.options.fadeDuration,f)}else{f()}}}function bJ(i){var d=bF.getCurrent();aM("sb-title-inner").innerHTML=d.title||"";var j,f,m,k,g;if(bF.options.displayNav){j=true;var h=bF.gallery.length;if(h>1){if(bF.options.continuous){f=g=true}else{f=(h-1)>bF.current;g=bF.current>0}}if(bF.options.slideshowDelay>0&&bF.hasNext()){k=!bF.isPaused();m=!k}}else{j=f=m=k=g=false}bG("close",j);bG("next",f);bG("play",m);bG("pause",k);bG("previous",g);var l="";if(bF.options.displayCounter&&bF.gallery.length>1){var h=bF.gallery.length;if(bF.options.counterType=="skip"){var c=0,b=h,a=parseInt(bF.options.counterLimit)||0;if(a<h&&a>2){var e=Math.floor(a/2);c=bF.current-e;if(c<0){c+=h}b=bF.current+(a-e);if(b>h){b-=h}}while(c!=b){if(c==h){c=0}l+='<a onclick="Shadowbox.change('+c+');"';if(c==bF.current){l+=' class="sb-counter-current"'}l+=">"+(++c)+"</a>"}}else{l=[bF.current+1,bF.lang.of,h].join(" ")}}aM("sb-counter").innerHTML=l;i()}function bM(b){var c=aM("sb-title-inner"),a=aM("sb-info-inner"),d=0.35;c.style.visibility=a.style.visibility="";if(c.innerHTML!=""){bz(c,"marginTop",0,d)}bz(a,"marginTop",0,d,b)}function a6(a,g){var e=aM("sb-title"),h=aM("sb-info"),b=e.offsetHeight,c=h.offsetHeight,d=aM("sb-title-inner"),f=aM("sb-info-inner"),i=(a?0.35:0);bz(d,"marginTop",b,i);bz(f,"marginTop",c*-1,i,function(){d.style.visibility=f.style.visibility="hidden";g()})}function aK(e,b,f,d){var c=aM("sb-wrapper-inner"),a=(f?bF.options.resizeDuration:0);bz(bW,"top",b,a);bz(c,"height",e,a,d)}function a3(d,b,e,c){var a=(e?bF.options.resizeDuration:0);bz(bW,"left",b,a);bz(bW,"width",d,a,c)}function aW(g,a){var c=aM("sb-body-inner"),g=parseInt(g),a=parseInt(a),i=bW.offsetHeight-c.offsetHeight,h=bW.offsetWidth-c.offsetWidth,e=aO.offsetHeight,f=aO.offsetWidth,d=parseInt(bF.options.viewportPadding)||20,b=(bF.player&&bF.options.handleOversize!="drag");return bF.setDimensions(g,a,e,f,i,h,d,b)}var bK={};bK.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-inner"><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-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></div></div></div>';bK.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.75,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};bK.init=function(){bF.appendHTML(document.body,bI(bK.markup,bF.lang));bK.body=aM("sb-body-inner");aG=aM("sb-container");aO=aM("sb-overlay");bW=aM("sb-wrapper");if(!bR){aG.style.position="absolute"}if(!bn){var a,c,d=/url\("(.*\.png)"\)/;aR(bE,function(e,f){a=aM(f);if(a){c=bF.getStyle(a,"backgroundImage").match(d);if(c){a.style.backgroundImage="none";a.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+c[1]+",sizingMethod=scale);"}}})}var b;bk(a5,"resize",function(){if(b){clearTimeout(b);b=null}if(S){b=setTimeout(bK.onWindowResize,10)}})};bK.onOpen=function(b,a){bw=false;aG.style.display="block";aJ();var c=aW(bF.options.initialHeight,bF.options.initialWidth);aK(c.innerHeight,c.top);a3(c.width,c.left);if(bF.options.showOverlay){aO.style.backgroundColor=bF.options.overlayColor;bF.setOpacity(aO,0);if(!bF.options.modal){bk(aO,"click",bF.close)}a0=true}if(!bR){aP();bk(a5,"scroll",aP)}a9();aG.style.visibility="visible";if(a0){bz(aO,"opacity",bF.options.overlayOpacity,bF.options.fadeDuration,a)}else{a()}};bK.onLoad=function(b,a){aT(true);while(bK.body.firstChild){be(bK.body.firstChild)}a6(b,function(){if(!S){return}if(!b){bW.style.visibility="visible"}bJ(a)})};bK.onReady=function(b){if(!S){return}var d=bF.player,a=aW(d.height,d.width);var c=function(){bM(b)};switch(bF.options.animSequence){case"hw":aK(a.innerHeight,a.top,true,function(){a3(a.width,a.left,true,c)});break;case"wh":a3(a.width,a.left,true,function(){aK(a.innerHeight,a.top,true,c)});break;default:a3(a.width,a.left,true);aK(a.innerHeight,a.top,true,c)}};bK.onShow=function(a){aT(false,a);bw=true};bK.onClose=function(){if(!bR){bx(a5,"scroll",aP)}bx(aO,"click",bF.close);bW.style.visibility="hidden";var a=function(){aG.style.visibility="hidden";aG.style.display="none";a9(true)};if(a0){bz(aO,"opacity",0,bF.options.fadeDuration,a)}else{a()}};bK.onPlay=function(){bG("play",false);bG("pause",true)};bK.onPause=function(){bG("pause",false);bG("play",true)};bK.onWindowResize=function(){if(!bw){return}aJ();var a=bF.player,b=aW(a.height,a.width);a3(b.width,b.left);aK(b.innerHeight,b.top);if(a.onWindowResize){a.onWindowResize()}};bF.skin=bK;a5.Shadowbox=bF})(window);var swfobject=function(){var ae="undefined",aG="object",aJ="Shockwave Flash",aR="ShockwaveFlash.ShockwaveFlash",aE="application/x-shockwave-flash",aH="SWFObjectExprInst",aS="onreadystatechange",aB=window,ap=document,aK=navigator,aL=false,aN=[al],aA=[],az=[],ao=[],au,aF,ag,aa,aq=false,X=false,ay,ak,aw=true,ax=function(){var a=typeof ap.getElementById!=ae&&typeof ap.getElementsByTagName!=ae&&typeof ap.createElement!=ae,h=aK.userAgent.toLowerCase(),j=aK.platform.toLowerCase(),e=j?/win/.test(j):/win/.test(h),c=j?/mac/.test(j):/mac/.test(h),f=/webkit/.test(h)?parseFloat(h.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,i=!+"\v1",g=[0,0,0],b=null;if(typeof aK.plugins!=ae&&typeof aK.plugins[aJ]==aG){b=aK.plugins[aJ].description;if(b&&!(typeof aK.mimeTypes!=ae&&aK.mimeTypes[aE]&&!aK.mimeTypes[aE].enabledPlugin)){aL=true;i=false;b=b.replace(/^.*\s+(\S+\s+\S+$)/,"$1");g[0]=parseInt(b.replace(/^(.*)\..*$/,"$1"),10);g[1]=parseInt(b.replace(/^.*\.(.*)\s.*$/,"$1"),10);g[2]=/[a-zA-Z]/.test(b)?parseInt(b.replace(/^.*[a-zA-Z]+(.*)$/,"$1"),10):0}}else{if(typeof aB.ActiveXObject!=ae){try{var d=new ActiveXObject(aR);if(d){b=d.GetVariable("$version");if(b){i=true;b=b.split(" ")[1].split(",");g=[parseInt(b[0],10),parseInt(b[1],10),parseInt(b[2],10)]}}}catch(k){}}}return{w3:a,pv:g,wk:f,ie:i,win:e,mac:c}}(),ar=function(){if(!ax.w3){return}if((typeof ap.readyState!=ae&&ap.readyState=="complete")||(typeof ap.readyState==ae&&(ap.getElementsByTagName("body")[0]||ap.body))){ah()}if(!aq){if(typeof ap.addEventListener!=ae){ap.addEventListener("DOMContentLoaded",ah,false)}if(ax.ie&&ax.win){ap.attachEvent(aS,function(){if(ap.readyState=="complete"){ap.detachEvent(aS,arguments.callee);ah()}});if(aB==top){(function(){if(aq){return}try{ap.documentElement.doScroll("left")}catch(a){setTimeout(arguments.callee,0);return}ah()})()}}if(ax.wk){(function(){if(aq){return}if(!/loaded|complete/.test(ap.readyState)){setTimeout(arguments.callee,0);return}ah()})()}aI(ah)}}();function ah(){if(aq){return}try{var d=ap.getElementsByTagName("body")[0].appendChild(ac("span"));d.parentNode.removeChild(d)}catch(a){return}aq=true;var b=aN.length;for(var c=0;c<b;c++){aN[c]()}}function at(a){if(aq){a()}else{aN[aN.length]=a}}function aI(b){if(typeof aB.addEventListener!=ae){aB.addEventListener("load",b,false)}else{if(typeof ap.addEventListener!=ae){ap.addEventListener("load",b,false)}else{if(typeof aB.attachEvent!=ae){an(aB,"onload",b)}else{if(typeof aB.onload=="function"){var a=aB.onload;aB.onload=function(){a();b()}}else{aB.onload=b}}}}}function al(){if(aL){aP()}else{am()}}function aP(){var b=ap.getElementsByTagName("body")[0];var a=ac(aG);a.setAttribute("type",aE);var d=b.appendChild(a);if(d){var c=0;(function(){if(typeof d.GetVariable!=ae){var e=d.GetVariable("$version");if(e){e=e.split(" ")[1].split(",");ax.pv=[parseInt(e[0],10),parseInt(e[1],10),parseInt(e[2],10)]}}else{if(c<10){c++;setTimeout(arguments.callee,10);return}}b.removeChild(a);d=null;am()})()}else{am()}}function am(){var g=aA.length;if(g>0){for(var f=0;f<g;f++){var k=aA[f].id;var b=aA[f].callbackFn;var a={success:false,id:k};if(ax.pv[0]>0){var e=ab(k);if(e){if(ai(aA[f].swfVersion)&&!(ax.wk&&ax.wk<312)){aQ(k,true);if(b){a.success=true;a.ref=aU(k);b(a)}}else{if(aA[f].expressInstall&&Y()){var i={};i.data=aA[f].expressInstall;i.width=e.getAttribute("width")||"0";i.height=e.getAttribute("height")||"0";if(e.getAttribute("class")){i.styleclass=e.getAttribute("class")}if(e.getAttribute("align")){i.align=e.getAttribute("align")}var h={};var j=e.getElementsByTagName("param");var c=j.length;for(var d=0;d<c;d++){if(j[d].getAttribute("name").toLowerCase()!="movie"){h[j[d].getAttribute("name")]=j[d].getAttribute("value")}}aD(i,h,k,b)}else{aC(e);if(b){b(a)}}}}}else{aQ(k,true);if(b){var l=aU(k);if(l&&typeof l.SetVariable!=ae){a.success=true;a.ref=l}b(a)}}}}}function aU(a){var b=null;var c=ab(a);if(c&&c.nodeName=="OBJECT"){if(typeof c.SetVariable!=ae){b=c}else{var d=c.getElementsByTagName(aG)[0];if(d){b=d}}}return b}function Y(){return !X&&ai("6.0.65")&&(ax.win||ax.mac)&&!(ax.wk&&ax.wk<312)}function aD(a,b,f,h){X=true;ag=h||null;aa={success:false,id:f};var e=ab(f);if(e){if(e.nodeName=="OBJECT"){au=aj(e);aF=null}else{au=e;aF=f}a.id=aH;if(typeof a.width==ae||(!/%$/.test(a.width)&&parseInt(a.width,10)<310)){a.width="310"}if(typeof a.height==ae||(!/%$/.test(a.height)&&parseInt(a.height,10)<137)){a.height="137"}ap.title=ap.title.slice(0,47)+" - Flash Player Installation";var d=ax.ie&&ax.win?"ActiveX":"PlugIn",c="MMredirectURL="+aB.location.toString().replace(/&/g,"%26")+"&MMplayerType="+d+"&MMdoctitle="+ap.title;if(typeof b.flashvars!=ae){b.flashvars+="&"+c}else{b.flashvars=c}if(ax.ie&&ax.win&&e.readyState!=4){var g=ac("div");f+="SWFObjectNew";g.setAttribute("id",f);e.parentNode.insertBefore(g,e);e.style.display="none";(function(){if(e.readyState==4){e.parentNode.removeChild(e)}else{setTimeout(arguments.callee,10)}})()}aM(a,b,f)}}function aC(b){if(ax.ie&&ax.win&&b.readyState!=4){var a=ac("div");b.parentNode.insertBefore(a,b);a.parentNode.replaceChild(aj(b),a);b.style.display="none";(function(){if(b.readyState==4){b.parentNode.removeChild(b)}else{setTimeout(arguments.callee,10)}})()}else{b.parentNode.replaceChild(aj(b),b)}}function aj(b){var a=ac("div");if(ax.win&&ax.ie){a.innerHTML=b.innerHTML}else{var e=b.getElementsByTagName(aG)[0];if(e){var c=e.childNodes;if(c){var d=c.length;for(var f=0;f<d;f++){if(!(c[f].nodeType==1&&c[f].nodeName=="PARAM")&&!(c[f].nodeType==8)){a.appendChild(c[f].cloneNode(true))}}}}}return a}function aM(i,g,k){var j,a=ab(k);if(ax.wk&&ax.wk<312){return j}if(a){if(typeof i.id==ae){i.id=k}if(ax.ie&&ax.win){var h="";for(var e in i){if(i[e]!=Object.prototype[e]){if(e.toLowerCase()=="data"){g.movie=i[e]}else{if(e.toLowerCase()=="styleclass"){h+=' class="'+i[e]+'"'}else{if(e.toLowerCase()!="classid"){h+=" "+e+'="'+i[e]+'"'}}}}}var f="";for(var d in g){if(g[d]!=Object.prototype[d]){f+='<param name="'+d+'" value="'+g[d]+'" />'}}a.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+h+">"+f+"</object>";az[az.length]=i.id;j=ab(i.id)}else{var l=ac(aG);l.setAttribute("type",aE);for(var c in i){if(i[c]!=Object.prototype[c]){if(c.toLowerCase()=="styleclass"){l.setAttribute("class",i[c])}else{if(c.toLowerCase()!="classid"){l.setAttribute(c,i[c])}}}}for(var b in g){if(g[b]!=Object.prototype[b]&&b.toLowerCase()!="movie"){af(l,b,g[b])}}a.parentNode.replaceChild(l,a);j=l}}return j}function af(d,b,c){var a=ac("param");a.setAttribute("name",b);a.setAttribute("value",c);d.appendChild(a)}function aT(b){var a=ab(b);if(a&&a.nodeName=="OBJECT"){if(ax.ie&&ax.win){a.style.display="none";(function(){if(a.readyState==4){Z(b)}else{setTimeout(arguments.callee,10)}})()}else{a.parentNode.removeChild(a)}}}function Z(c){var b=ab(c);if(b){for(var a in b){if(typeof b[a]=="function"){b[a]=null}}b.parentNode.removeChild(b)}}function ab(c){var a=null;try{a=ap.getElementById(c)}catch(b){}return a}function ac(a){return ap.createElement(a)}function an(c,a,b){c.attachEvent(a,b);ao[ao.length]=[c,a,b]}function ai(c){var b=ax.pv,a=c.split(".");a[0]=parseInt(a[0],10);a[1]=parseInt(a[1],10)||0;a[2]=parseInt(a[2],10)||0;return(b[0]>a[0]||(b[0]==a[0]&&b[1]>a[1])||(b[0]==a[0]&&b[1]==a[1]&&b[2]>=a[2]))?true:false}function aO(c,f,d,b){if(ax.ie&&ax.mac){return}var a=ap.getElementsByTagName("head")[0];if(!a){return}var e=(d&&typeof d=="string")?d:"screen";if(b){ay=null;ak=null}if(!ay||ak!=e){var g=ac("style");g.setAttribute("type","text/css");g.setAttribute("media",e);ay=a.appendChild(g);if(ax.ie&&ax.win&&typeof ap.styleSheets!=ae&&ap.styleSheets.length>0){ay=ap.styleSheets[ap.styleSheets.length-1]}ak=e}if(ax.ie&&ax.win){if(ay&&typeof ay.addRule==aG){ay.addRule(c,f)}}else{if(ay&&typeof ap.createTextNode!=ae){ay.appendChild(ap.createTextNode(c+" {"+f+"}"))}}}function aQ(c,a){if(!aw){return}var b=a?"visible":"hidden";if(aq&&ab(c)){ab(c).style.visibility=b}else{aO("#"+c,"visibility:"+b)}}function av(b){var c=/[\\\"<>\.;]/;var a=c.exec(b)!=null;return a&&typeof encodeURIComponent!=ae?encodeURIComponent(b):b}var ad=function(){if(ax.ie&&ax.win){window.attachEvent("onunload",function(){var c=ao.length;for(var b=0;b<c;b++){ao[b][0].detachEvent(ao[b][1],ao[b][2])}var f=az.length;for(var a=0;a<f;a++){aT(az[a])}for(var e in ax){ax[e]=null}ax=null;for(var d in swfobject){swfobject[d]=null}swfobject=null})}}();return{registerObject:function(b,c,a,e){if(ax.w3&&b&&c){var d={};d.id=b;d.swfVersion=c;d.expressInstall=a;d.callbackFn=e;aA[aA.length]=d;aQ(b,false)}else{if(e){e({success:false,id:b})}}},getObjectById:function(a){if(ax.w3){return aU(a)}},embedSWF:function(b,h,e,g,j,a,k,d,f,c){var i={success:false,id:h};if(ax.w3&&!(ax.wk&&ax.wk<312)&&b&&h&&e&&g&&j){aQ(h,false);at(function(){e+="";g+="";var m={};if(f&&typeof f===aG){for(var o in f){m[o]=f[o]}}m.data=b;m.width=e;m.height=g;var p={};if(d&&typeof d===aG){for(var n in d){p[n]=d[n]}}if(k&&typeof k===aG){for(var l in k){if(typeof p.flashvars!=ae){p.flashvars+="&"+l+"="+k[l]}else{p.flashvars=l+"="+k[l]}}}if(ai(j)){var q=aM(m,p,h);if(m.id==h){aQ(h,true)}i.success=true;i.ref=q}else{if(a&&Y()){m.data=a;aD(m,p,h,c);return}else{aQ(h,true)}}if(c){c(i)}})}else{if(c){c(i)}}},switchOffAutoHideShow:function(){aw=false},ua:ax,getFlashPlayerVersion:function(){return{major:ax.pv[0],minor:ax.pv[1],release:ax.pv[2]}},hasFlashPlayerVersion:ai,createSWF:function(c,b,a){if(ax.w3){return aM(c,b,a)}else{return undefined}},showExpressInstall:function(d,a,b,c){if(ax.w3&&Y()){aD(d,a,b,c)}},removeSWF:function(a){if(ax.w3){aT(a)}},createCSS:function(a,d,c,b){if(ax.w3){aO(a,d,c,b)}},addDomLoadEvent:at,addLoadEvent:aI,getQueryParamValue:function(a){var d=ap.location.search||ap.location.hash;if(d){if(/\?/.test(d)){d=d.split("?")[1]}if(a==null){return av(d)}var c=d.split("&");for(var b=0;b<c.length;b++){if(c[b].substring(0,c[b].indexOf("="))==a){return av(c[b].substring((c[b].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(X){var a=ab(aH);if(a&&au){a.parentNode.replaceChild(au,a);if(aF){aQ(aF,true);if(ax.ie&&ax.win){au.style.display="block"}}if(ag){ag(aa)}}X=false}}}}();if(jQuery){(function(b){b.extend(b.fn,{uploadify:function(a){b(this).each(function(){var l=b.extend({id:b(this).attr("id"),uploader:"uploadify.swf",script:"uploadify.php",expressInstall:null,folder:"",height:30,width:120,cancelImg:"cancel.png",wmode:"opaque",scriptAccess:"sameDomain",fileDataName:"Filedata",method:"POST",queueSizeLimit:999,simUploadLimit:1,queueID:false,displayData:"percentage",removeCompleted:true,onInit:function(){},onSelect:function(){},onSelectOnce:function(){},onQueueFull:function(){},onCheck:function(){},onCancel:function(){},onClearQueue:function(){},onError:function(){},onProgress:function(){},onComplete:function(){},onAllComplete:function(){}},a);b(this).data("settings",l);var k=location.pathname;k=k.split("/");k.pop();k=k.join("/")+"/";var m={};m.uploadifyID=l.id;m.pagepath=k;if(l.buttonImg){m.buttonImg=escape(l.buttonImg)}if(l.buttonText){m.buttonText=escape(l.buttonText)}if(l.rollover){m.rollover=true}m.script=l.script;m.folder=escape(l.folder);if(l.scriptData){var n="";for(var j in l.scriptData){n+="&"+j+"="+l.scriptData[j]}m.scriptData=escape(n.substr(1))}m.width=l.width;m.height=l.height;m.wmode=l.wmode;m.method=l.method;m.queueSizeLimit=l.queueSizeLimit;m.simUploadLimit=l.simUploadLimit;if(l.hideButton){m.hideButton=true}if(l.fileDesc){m.fileDesc=l.fileDesc}if(l.fileExt){m.fileExt=l.fileExt}if(l.multi){m.multi=true}if(l.auto){m.auto=true}if(l.sizeLimit){m.sizeLimit=l.sizeLimit}if(l.checkScript){m.checkScript=l.checkScript}if(l.fileDataName){m.fileDataName=l.fileDataName}if(l.queueID){m.queueID=l.queueID}if(l.onInit()!==false){b(this).css("display","none");b(this).after('<div id="'+b(this).attr("id")+'Uploader"></div>');swfobject.embedSWF(l.uploader,l.id+"Uploader",l.width,l.height,"9.0.24",l.expressInstall,m,{quality:"high",wmode:l.wmode,allowScriptAccess:l.scriptAccess},{},function(c){if(typeof(l.onSWFReady)=="function"&&c.success){l.onSWFReady()}});if(l.queueID==false){b("#"+b(this).attr("id")+"Uploader").after('<div id="'+b(this).attr("id")+'Queue" class="uploadifyQueue"></div>')}else{b("#"+l.queueID).addClass("uploadifyQueue")}}if(typeof(l.onOpen)=="function"){b(this).bind("uploadifyOpen",l.onOpen)}b(this).bind("uploadifySelect",{action:l.onSelect,queueID:l.queueID},function(e,c,d){if(e.data.action(e,c,d)!==false){var f=Math.round(d.size/1024*100)*0.01;var g="KB";if(f>1000){f=Math.round(f*0.001*100)*0.01;g="MB"}var h=f.toString().split(".");if(h.length>1){f=h[0]+"."+h[1].substr(0,2)}else{f=h[0]}if(d.name.length>20){fileName=d.name.substr(0,20)+"..."}else{fileName=d.name}queue="#"+b(this).attr("id")+"Queue";if(e.data.queueID){queue="#"+e.data.queueID}b(queue).append('<div id="'+b(this).attr("id")+c+'" class="uploadifyQueueItem"><div class="cancel"><a href="javascript:jQuery(\'#'+b(this).attr("id")+"').uploadifyCancel('"+c+'\')"><img src="'+l.cancelImg+'" border="0" /></a></div><span class="fileName">'+fileName+" ("+f+g+')</span><span class="percentage"></span><div class="uploadifyProgress"><div id="'+b(this).attr("id")+c+'ProgressBar" class="uploadifyProgressBar"><!--Progress Bar--></div></div></div>')}});b(this).bind("uploadifySelectOnce",{action:l.onSelectOnce},function(c,d){c.data.action(c,d);if(l.auto){if(l.checkScript){b(this).uploadifyUpload(null,false)}else{b(this).uploadifyUpload(null,true)}}});b(this).bind("uploadifyQueueFull",{action:l.onQueueFull},function(c,d){if(c.data.action(c,d)!==false){alert("The queue is full.  The max size is "+d+".")}});b(this).bind("uploadifyCheckExist",{action:l.onCheck},function(h,g,f,e,r){var d=new Object();d=f;d.folder=(e.substr(0,1)=="/")?e:k+e;if(r){for(var c in f){var q=c}}b.post(g,d,function(t){for(var o in t){if(h.data.action(h,t,o)!==false){var p=confirm("Do you want to replace the file "+t[o]+"?");if(!p){document.getElementById(b(h.target).attr("id")+"Uploader").cancelFileUpload(o,true,true)}}}if(r){document.getElementById(b(h.target).attr("id")+"Uploader").startFileUpload(q,true)}else{document.getElementById(b(h.target).attr("id")+"Uploader").startFileUpload(null,true)}},"json")});b(this).bind("uploadifyCancel",{action:l.onCancel},function(h,d,g,p,c,f){if(h.data.action(h,d,g,p,f)!==false){if(c){var e=(f==true)?0:250;b("#"+b(this).attr("id")+d).fadeOut(e,function(){b(this).remove()})}}});b(this).bind("uploadifyClearQueue",{action:l.onClearQueue},function(e,d){var c=(l.queueID)?l.queueID:b(this).attr("id")+"Queue";if(d){b("#"+c).find(".uploadifyQueueItem").remove()}if(e.data.action(e,d)!==false){b("#"+c).find(".uploadifyQueueItem").each(function(){var f=b(".uploadifyQueueItem").index(this);b(this).delay(f*100).fadeOut(250,function(){b(this).remove()})})}});var i=[];b(this).bind("uploadifyError",{action:l.onError},function(g,c,f,e){if(g.data.action(g,c,f,e)!==false){var d=new Array(c,f,e);i.push(d);b("#"+b(this).attr("id")+c).find(".percentage").text(" - "+e.type+" Error");b("#"+b(this).attr("id")+c).find(".uploadifyProgress").hide();b("#"+b(this).attr("id")+c).addClass("uploadifyError")}});if(typeof(l.onUpload)=="function"){b(this).bind("uploadifyUpload",l.onUpload)}b(this).bind("uploadifyProgress",{action:l.onProgress,toDisplay:l.displayData},function(e,c,d,f){if(e.data.action(e,c,d,f)!==false){b("#"+b(this).attr("id")+c+"ProgressBar").animate({width:f.percentage+"%"},250,function(){if(f.percentage==100){b(this).closest(".uploadifyProgress").fadeOut(250,function(){b(this).remove()})}});if(e.data.toDisplay=="percentage"){displayData=" - "+f.percentage+"%"}if(e.data.toDisplay=="speed"){displayData=" - "+f.speed+"KB/s"}if(e.data.toDisplay==null){displayData=" "}b("#"+b(this).attr("id")+c).find(".percentage").text(displayData)}});b(this).bind("uploadifyComplete",{action:l.onComplete},function(f,c,e,d,g){if(f.data.action(f,c,e,unescape(d),g)!==false){b("#"+b(this).attr("id")+c).find(".percentage").text(" - Completed");if(l.removeCompleted){b("#"+b(f.target).attr("id")+c).fadeOut(250,function(){b(this).remove()})}b("#"+b(f.target).attr("id")+c).addClass("completed")}});if(typeof(l.onAllComplete)=="function"){b(this).bind("uploadifyAllComplete",{action:l.onAllComplete},function(c,d){if(c.data.action(c,d)!==false){i=[]}})}})},uploadifySettings:function(m,p,i){var n=false;b(this).each(function(){if(m=="scriptData"&&p!=null){if(i){var c=p}else{var c=b.extend(b(this).data("settings").scriptData,p)}var e="";for(var d in c){e+="&"+d+"="+c[d]}p=escape(e.substr(1))}n=document.getElementById(b(this).attr("id")+"Uploader").updateSettings(m,p)});if(p==null){if(m=="scriptData"){var a=unescape(n).split("&");var l=new Object();for(var k=0;k<a.length;k++){var o=a[k].split("=");l[o[0]]=o[1]}n=l}}return n},uploadifyUpload:function(a,d){b(this).each(function(){if(!d){d=false}document.getElementById(b(this).attr("id")+"Uploader").startFileUpload(a,d)})},uploadifyCancel:function(a){b(this).each(function(){document.getElementById(b(this).attr("id")+"Uploader").cancelFileUpload(a,true,true,false)})},uploadifyClearQueue:function(){b(this).each(function(){document.getElementById(b(this).attr("id")+"Uploader").clearFileUploadQueue(false)})}})})(jQuery)};var MasterController={Index:function(a){jQuery(function(b){b(function(){MasterView.Gallery();MasterView.Header();MasterView.EmailUpdatesForm();MasterView.Quicklinks();MasterView.Uploadify(a);MasterView.Collapser();Shadowbox.init();b("tr:odd").css({backgroundColor:"#DDD"})})})}};var UtilityView={InputFocus:function(){var a=this.defaultValue;if(a==this.value){this.value=""}},InputBlur:function(){if(this.value==""){var a=this.defaultValue;this.value=a}}};var MasterView={Gallery:function(){jQuery(function(a){a(function(){a(".gallery a").hover(function(){a(this).find("div").animate({top:"-40px"},"fast")},function(){a(this).find("div").animate({top:"0px"},"fast")})})})},Quicklinks:function(){jQuery(function(a){a(function(){a(".quicklinks h4").click(function(){a(".quicklinks ul").slideToggle("fast")});a(".quicklinks .hoverable").hover(function(){a(this).find("ul").slideDown("fast")},function(){a(this).find("ul").slideUp("fast")})})})},Uploadify:function(a){jQuery(function(b){b(function(){var c="";if(a=="Dev"){c="/generalcouncil"}b("#VideoFile").uploadify({uploader:c+"/Content/flash/uploadify.swf",expressInstall:c+"/Content/flash/expressInstall.swf",script:c+"/upload/submit",cancelImg:c+"/Content/images/cancel.png",fileDataName:"videoFile",buttonText:"Select Video...",fileDesc:"Video Files",fileExt:"*.mp4;*.avi;*.mpg;*.mov;*.mkv;*.wmv;",multi:"false",sizeLimit:314572800,auto:false,onAllComplete:function(e,d){if(d.errors==0){b("#UploadForm .info").removeClass("bad").addClass("good").html("Upload Successful!").show().delay(5000).fadeOut("medium");b("#YourFirstName").val("");b("#YourLastName").val("");b("#YourEmail").val("");b("#Description").val("");b("#TermsOfUse").attr("checked",false);b("#SubmitStory").show();b("#UploadForm .loading").hide()}else{if(console){console.log(e);console.log(d)}}},onError:function(e,d){}});b("#SubmitStory").click(function(g){g.preventDefault();var i=b("#YourFirstName").val();var j=b("#YourLastName").val();var h=b("#YourEmail").val();var f=b("#Description").val();var d=b("#TermsOfUse").attr("checked");if(i==""){b("#UploadForm .info").removeClass("good").addClass("bad").html("Please enter your first name.").show().delay(5000).fadeOut("medium");return}if(j==""){b("#UploadForm .info").removeClass("good").addClass("bad").html("Please enter your last name.").show().delay(5000).fadeOut("medium");return}if(h==""){b("#UploadForm .info").removeClass("good").addClass("bad").html("Please enter your email.").show().delay(5000).fadeOut("medium");return}if(d==false){b("#UploadForm .info").removeClass("email").addClass("bad").html("Please agree to the Terms of Use before uploading.").show().delay(5000).fadeOut("medium");return}b("#VideoFile").uploadifySettings("scriptData",{firstName:i,lastName:j,email:h,comments:f,agreeToTerms:d});b("#SubmitStory").hide();b("#UploadForm .loading").show();b("#VideoFile").uploadifyUpload()})})})},EmailUpdatesForm:function(){jQuery(function(a){a(function(){a("#EmailUpdates-Name, #EmailUpdates-Email").focus(UtilityView.InputFocus).blur(UtilityView.InputBlur);a("#EmailUpdates").submit(function(b){b.preventDefault();if((a("#EmailUpdates-Name").val()=="your name")||(a("#EmailUpdates-Name").val()=="")){a(".emailUpdates .info").removeClass("good").addClass("bad").html("Please enter your name.").show().delay(5000).fadeOut("medium");return false}if((a("#EmailUpdates-Email").val()=="your email")||(a("#EmailUpdates-Email").val()=="")){a(".emailUpdates .info").removeClass("good").addClass("bad").html("Please enter your email.").show().delay(5000).fadeOut("medium");return false}a.get("http://news.ag.org/subscribe/subscribe.tml",a("#EmailUpdates").serialize());a(".emailUpdates .info").removeClass("bad").addClass("good").html("Please check your email to confirm subscription.").show().delay(5000).fadeOut("medium")})})})},Header:function(){jQuery(function(a){a(function(){var c=a(".slider .contained");var g=a(c[0]);var b=g;var e=8;var j=null;var d=0;var h=a(".bullets").find("a");c.css("display","none");a(b).fadeIn("medium");k(d);h.click(function(l){d=a(this).attr("href")-1;a(b).fadeOut(500);b=a(c[d]);k(d);a(b).delay(500).fadeIn(500);window.clearInterval(j);i();l.preventDefault()});function i(){j=window.setInterval(f,e*1000)}function k(l){h.removeClass("active");a(h[l]).addClass("active")}function f(){a(b).fadeOut();if(a(b).next().length>0){b=a(b).next();d++}else{b=g;d=0}k(d);a(b).delay(500).fadeIn(500)}if(c.length>1){i()}})})},Collapser:function(){jQuery(function(a){a(function(){a(".show-hide").append("<span>View Details</span>");a(".show-hide").click(function(){a(".sh-"+a(this).attr("target")).addClass("indent").toggle()})})})}};var HomeView={Index:function(){jQuery(function(a){a(function(){var b="who";if(location.hash){b=location.hash;b=b.substring(1,b.length)}function c(){a("#tabwho, #tabwhat, #tabwhere, #tabwhen, #tabwhy, #tabregister").hide()}function e(g){a("#tab"+g).fadeIn()}function d(g){a("#tab"+g).hide()}function f(g){d(b);b=g;e(b)}a("#Questions a, .contentNav .previous, .contentNav .next, .homelink").click(function(g){var h=a(g.currentTarget).attr("href");h=h.split("#")[1];f(h);a("#Questions a").removeClass("active");a(g.currentTarget).addClass("active");g.preventDefault()});a("#tab"+b).show()})})}};
