/*
 * Shadowbox.js, version 3.0.3
 * Path errors  fixed by Tom Flídr
 * http://shadowbox-js.com/
 *
 * Copyright 2007-2010, Michael J. I. Jackson
 * Date: 2011-05-22 20:01:52 +0000
 *
 * Sizzle CSS Selector Engine - v1.0
 *  Copyright 2009, The Dojo Foundation
 *  Released under the MIT, BSD, and GPL Licenses.
 *  More information: http://sizzlejs.com/
 *
 * Modified for inclusion in Shadowbox.js
 *
 * SWFObject v2.1 <http://code.google.com/p/swfobject/>
 * Copyright (c) 2007-2008 Geoff Stearns, Michael Williams, and Bobby van der Sluis
 * This software is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
 *
 * Modified for inclusion in Shadowbox.js
 */

(function(B,C){var S={version:"3.0.3"};var D=navigator.userAgent.toLowerCase();if(D.indexOf("windows")>-1||D.indexOf("win32")>-1){S.isWindows=true}else{if(D.indexOf("macintosh")>-1||D.indexOf("mac os x")>-1){S.isMac=true}else{if(D.indexOf("linux")>-1){S.isLinux=true}}}S.isIE=D.indexOf("msie")>-1;S.isIE6=D.indexOf("msie 6")>-1;S.isIE7=D.indexOf("msie 7")>-1;S.isGecko=D.indexOf("gecko")>-1&&D.indexOf("safari")==-1;S.isWebKit=D.indexOf("applewebkit/")>-1;var E=/#(.+)$/,galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i;var F=false,initialized=false,forceInit=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=function(){var a=document.getElementById('shadowbox-swf-path');if(a){return a.value}else{return''}};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 F};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(a,b){if(typeof(a.forceInit)=='undefined'){a.forceInit=false;};if(initialized&&!a.forceInit){return};forceInit=a.forceInit;initialized=true;if(S.skin.options){apply(S.options,S.skin.options)}if(a){apply(S.options,a)}if(!S.path()){var c,scripts=document.getElementsByTagName("script");for(var i=0,len=scripts.length;i<len;++i){c=scriptPath.exec(scripts[i].src);if(c){S.path()=c[1];break}}}if(b){S.onReady=b}bindLoad()};S.open=function(a){if(F){return}var b=S.makeGallery(a);S.gallery=b[0];S.current=b[1];a=S.getCurrent();if(a==null){return}S.applyOptions(a.options||{});filterGallery();if(S.gallery.length){a=S.getCurrent();if(S.options.onOpen(a)===false){return}F=true;S.skin.onOpen(a,load)}};S.close=function(){if(!F){return}F=false;if(S.player){S.player.remove();S.player=null}if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null}slideDelay=0;listenKeys(false);S.options.onClose(S.getCurrent());S.skin.onClose();S.revertOptions()};S.play=function(){if(!S.hasNext()){return}if(!slideDelay){slideDelay=S.options.slideshowDelay*1000}if(slideDelay){slideStart=now();slideTimer=setTimeout(function(){slideDelay=slideStart=0;S.next()},slideDelay);if(S.skin.onPlay){S.skin.onPlay()}}};S.pause=function(){if(typeof slideTimer!="number"){return}slideDelay=Math.max(0,slideDelay-(now()-slideStart));if(slideDelay){clearTimeout(slideTimer);slideTimer="pause";if(S.skin.onPause){S.skin.onPause()}}};S.change=function(a){if(!(a in S.gallery)){if(S.options.continuous){a=(a<0?S.gallery.length+a:0);if(!(a in S.gallery)){return}}else{return}}S.current=a;if(typeof slideTimer=="number"){clearTimeout(slideTimer);slideTimer=null;slideDelay=slideStart=0}S.options.onChange(S.getCurrent());load(true)};S.next=function(){S.change(S.current+1)};S.previous=function(){S.change(S.current-1)};S.setDimensions=function(a,b,c,d,e,f,g,h){var i=a,originalWidth=b;var j=2*g+e;if(a+j>c){a=c-j}var k=2*g+f;if(b+k>d){b=d-k}var l=(i-a)/i,changeWidth=(originalWidth-b)/originalWidth,oversized=(l>0||changeWidth>0);if(h&&oversized){if(l>changeWidth){b=Math.round((originalWidth/i)*a)}else{if(changeWidth>l){a=Math.round((i/originalWidth)*b)}}}S.dimensions={height:a+e,width:b+f,innerHeight:a,innerWidth:b,top:Math.floor((c-(a+j))/2+g),left:Math.floor((d-(b+k))/2+g),oversized:oversized};return S.dimensions};S.makeGallery=function(a){var b=[],current=-1;if(typeof a=="string"){a=[a]}if(typeof a.length=="number"){each(a,function(i,o){if(o.content){b[i]=o}else{b[i]={content:o}}});current=0}else{if(a.tagName){var c=S.getCache(a);a=c?c:S.makeObject(a)}if(a.gallery){b=[];var o;for(var d in S.cache){o=S.cache[d];if(o.gallery&&o.gallery==a.gallery){if(current==-1&&o.content==a.content){current=b.length}b.push(o)}}if(current==-1){b.unshift(a);current=0}}else{b=[a];current=0}}each(b,function(i,o){b[i]=apply({},o)});return[b,current]};S.makeObject=function(a,b){var c={content:a.href,title:a.getAttribute("title")||"",link:a};if(b){b=apply({},b);each(["player","title","height","width","gallery"],function(i,o){if(typeof b[o]!="undefined"){c[o]=b[o];delete b[o]}});c.options=b}else{c.options={}}if(!c.player){c.player=S.getPlayer(c.content)}var d=a.getAttribute("rel");if(d){var e=d.match(galleryName);if(e){c.gallery=escape(e[2])}each(d.split(";"),function(i,p){e=p.match(inlineParam);if(e){c[e[1]]=e[2]}})}return c};S.getPlayer=function(a){if(a.indexOf("#")>-1&&a.indexOf(document.location.href)==0){return"inline"}var q=a.indexOf("?");if(q>-1){a=a.substring(0,q)}var b,m=a.match(fileExtension);if(m){b=m[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 a=S.errorInfo,plugins=S.plugins,obj,remove,needed,m,format,replace,inlineEl,flashVersion;for(var i=0;i<S.gallery.length;++i){obj=S.gallery[i];remove=false;needed=null;switch(obj.player){case"flv":case"swf":if(!plugins.fla){needed="fla"}break;case"qt":if(!plugins.qt){needed="qt"}break;case"wmp":if(S.isMac){if(plugins.qt&&plugins.f4m){obj.player="qt"}else{needed="qtf4m"}}else{if(!plugins.wmp){needed="wmp"}}break;case"qtwmp":if(plugins.qt){obj.player="qt"}else{if(plugins.wmp){obj.player="wmp"}else{needed="qtwmp"}}break}if(needed){if(S.options.handleUnsupported=="link"){switch(needed){case"qtf4m":format="shared";replace=[a.qt.url,a.qt.name,a.f4m.url,a.f4m.name];break;case"qtwmp":format="either";replace=[a.qt.url,a.qt.name,a.wmp.url,a.wmp.name];break;default:format="single";replace=[a[needed].url,a[needed].name]}obj.player="html";obj.content='<div class="sb-message">'+sprintf(S.lang.errors[format],replace)+"</div>"}else{remove=true}}else{if(obj.player=="inline"){m=E.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(i<S.current){--S.current}else{if(i==S.current){S.current=i>0?i-1:i}}--i}}}function listenKeys(a){if(!S.options.enableKeys){return}(a?addEvent:removeEvent)(document,"keydown",handleKey)}function handleKey(e){if(e.metaKey||e.shiftKey||e.altKey||e.ctrlKey){return}var a=keyCode(e),handler;switch(a){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(c){listenKeys(false);var d=S.getCurrent();var e=(d.player=="inline"?"html":d.player);if(typeof S[e]!="function"){throw"unknown player "+e}if(c){S.player.remove();S.revertOptions();S.applyOptions(d.options||{})}S.player=new S[e](d,S.playerId);if(S.gallery.length>1){var f=S.gallery[S.current+1]||S.gallery[0];if(f.player=="img"){var a=new Image();a.src=f.content}var g=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(g.player=="img"){var b=new Image();b.src=g.content}}S.skin.onLoad(c,waitReady)}function waitReady(){if(!F){return}if(typeof S.player.ready!="undefined"){var a=setInterval(function(){if(F){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(!F){return}S.player.append(S.skin.body,S.dimensions);S.skin.onShow(finish)}function finish(){if(!F){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(a,b){var c=this.length>>>0;b=b||0;if(b<0){b+=c}for(;b<c;++b){if(b in this&&this[b]===a){return b}}return-1}}function now(){return(new Date).getTime()}function apply(a,b){for(var c in b){a[c]=b[c]}return a}function each(a,b){var i=0,len=a.length;for(var c=a[0];i<len&&b.call(c,i,c)!==false;c=a[++i]){}}function sprintf(b,c){return b.replace(/\{(\w+?)\}/g,function(a,i){return c[i]})}function noop(){}function get(a){return document.getElementById(a)}function remove(a){a.parentNode.removeChild(a)}var G=true,supportsFixed=true;function checkSupport(){var a=document.body,div=document.createElement("div");G=typeof div.style.opacity==="string";div.style.position="fixed";div.style.margin=0;div.style.top="20px";a.appendChild(div,a.firstChild);supportsFixed=div.offsetTop==20;a.removeChild(div)}S.getStyle=(function(){var e=/opacity=([^)]*)/,getComputedStyle=document.defaultView&&document.defaultView.getComputedStyle;return function(a,b){var c;if(!G&&b=="opacity"&&a.currentStyle){c=e.test(a.currentStyle.filter||"")?(parseFloat(RegExp.$1)/100)+"":"";return c===""?"1":c}if(getComputedStyle){var d=getComputedStyle(a,null);if(d){c=d[b]}if(b=="opacity"&&c==""){c="1"}}else{c=a.currentStyle[b]}return c}})();S.appendHTML=function(a,b){if(a.insertAdjacentHTML){a.insertAdjacentHTML("BeforeEnd",b)}else{if(a.lastChild){var c=a.ownerDocument.createRange();c.setStartAfter(a.lastChild);var d=c.createContextualFragment(b);a.appendChild(d)}else{a.innerHTML=b}}};S.getWindowSize=function(a){if(document.compatMode==="CSS1Compat"){return document.documentElement["client"+a]}return document.body["client"+a]};S.setOpacity=function(a,b){var c=a.style;if(G){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)+")"}}};S.clearOpacity=function(a){S.setOpacity(a,1)};function getTarget(e){return e.target}function getPageXY(e){return[e.pageX,e.pageY]}function preventDefault(e){e.preventDefault()}function keyCode(e){return e.keyCode}function addEvent(a,b,c){jQuery(a).bind(b,c)}function removeEvent(a,b,c){jQuery(a).unbind(b,c)}jQuery.fn.shadowbox=function(d){return this.each(function(){var a=jQuery(this);var b=jQuery.extend({},d||{},jQuery.metadata?a.metadata():jQuery.meta?a.data():{});var c=this.className||"";b.width=parseInt((c.match(/w:(\d+)/)||[])[1])||b.width;b.height=parseInt((c.match(/h:(\d+)/)||[])[1])||b.height;Shadowbox.setup(a,b)})};var H=false,DOMContentLoaded;if(document.addEventListener){DOMContentLoaded=function(){document.removeEventListener("DOMContentLoaded",DOMContentLoaded,false);S.load()}}else{if(document.attachEvent){DOMContentLoaded=function(){if(document.readyState==="complete"){document.detachEvent("onreadystatechange",DOMContentLoaded);S.load()}}}}function doScrollCheck(){if(H){return}try{document.documentElement.doScroll("left")}catch(e){setTimeout(doScrollCheck,1);return}S.load()}function bindLoad(){if(document.readyState==="complete"){return S.load()}if(document.addEventListener){document.addEventListener("DOMContentLoaded",DOMContentLoaded,false);B.addEventListener("load",S.load,false)}else{if(document.attachEvent){document.attachEvent("onreadystatechange",DOMContentLoaded);B.attachEvent("onload",S.load);var a=false;try{a=B.frameElement===null}catch(e){}if(document.documentElement.doScroll&&a){doScrollCheck()}}}};S.load=function(){if(H&&!forceInit){return}if(!document.body){return setTimeout(S.load,13)}H=true;checkSupport();S.onReady();if(!S.options.skipSetup){S.setup()}S.skin.init()};S.plugins={};if(navigator.plugins&&navigator.plugins.length){var I=[];each(navigator.plugins,function(i,p){I.push(p.name)});I=I.join(",");var J=I.indexOf("Flip4Mac")>-1;S.plugins={fla:I.indexOf("Shockwave Flash")>-1,qt:I.indexOf("QuickTime")>-1,wmp:!J&&I.indexOf("Windows Media")>-1,f4m:J}}else{var L=function(a){var b;try{b=new ActiveXObject(a)}catch(e){}return!!b};S.plugins={fla:L("ShockwaveFlash.ShockwaveFlash"),qt:L("QuickTime.QuickTime"),wmp:L("wmplayer.ocx"),f4m:false}}var M=/^(light|shadow)box/i,expando="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(b){var c=[];if(!b){var d;each(document.getElementsByTagName("a"),function(i,a){d=a.getAttribute("rel");if(d&&M.test(d)){c.push(a)}})}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 i=0;i<e;++i){c[i]=b[i]}}}}else{c.push(b)}}return c};S.setup=function(b,c){each(S.select(b),function(i,a){S.addCache(a,c)})};S.teardown=function(b){each(S.select(b),function(i,a){S.removeCache(a)})};S.addCache=function(a,b){var c=a[expando];if(c==C){c=cacheKey++;a[expando]=c;addEvent(a,"click",handleClick)}S.cache[c]=S.makeObject(a,b)};S.removeCache=function(a){removeEvent(a,"click",handleClick);delete S.cache[a[expando]];a[expando]=null};S.getCache=function(a){var b=a[expando];return(b in S.cache&&S.cache[b])};S.clearCache=function(){for(var a in S.cache){S.removeCache(S.cache[a].link)}S.cache={}};function handleClick(e){S.open(this);if(S.gallery.length){preventDefault(e)}}S.find=(function(){var j=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,done=0,toString=Object.prototype.toString,hasDuplicate=false,baseHasDuplicate=true;[0,0].sort(function(){baseHasDuplicate=false;return 0});var k=function(a,b,c,d){c=c||[];var e=b=b||document;if(b.nodeType!==1&&b.nodeType!==9){return[]}if(!a||typeof a!=="string"){return c}var f=[],m,set,checkSet,extra,prune=true,contextXML=t(b),soFar=a;while((j.exec(""),m=j.exec(soFar))!==null){soFar=m[3];f.push(m[1]);if(m[2]){extra=m[3];break}}if(f.length>1&&o.exec(a)){if(f.length===2&&n.relative[f[0]]){set=u(f[0]+f[1],b)}else{set=n.relative[f[0]]?[b]:k(f.shift(),b);while(f.length){a=f.shift();if(n.relative[a]){a+=f.shift()}set=u(a,set)}}}else{if(!d&&f.length>1&&b.nodeType===9&&!contextXML&&n.match.ID.test(f[0])&&!n.match.ID.test(f[f.length-1])){var g=k.find(f.shift(),b,contextXML);b=g.expr?k.filter(g.expr,g.set)[0]:g.set[0]}if(b){var g=d?{expr:f.pop(),set:q(d)}:k.find(f.pop(),f.length===1&&(f[0]==="~"||f[0]==="+")&&b.parentNode?b.parentNode:b,contextXML);set=g.expr?k.filter(g.expr,g.set):g.set;if(f.length>0){checkSet=q(set)}else{prune=false}while(f.length){var h=f.pop(),pop=h;if(!n.relative[h]){h=""}else{pop=f.pop()}if(pop==null){pop=b}n.relative[h](checkSet,pop,contextXML)}}else{checkSet=f=[]}}if(!checkSet){checkSet=set}if(!checkSet){throw"Syntax error, unrecognized expression: "+(h||a)}if(toString.call(checkSet)==="[object Array]"){if(!prune){c.push.apply(c,checkSet)}else{if(b&&b.nodeType===1){for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&(checkSet[i]===true||checkSet[i].nodeType===1&&s(b,checkSet[i]))){c.push(set[i])}}}else{for(var i=0;checkSet[i]!=null;i++){if(checkSet[i]&&checkSet[i].nodeType===1){c.push(set[i])}}}}}else{q(checkSet,c)}if(extra){k(extra,e,c,d);k.uniqueSort(c)}return c};k.uniqueSort=function(a){if(r){hasDuplicate=baseHasDuplicate;a.sort(r);if(hasDuplicate){for(var i=1;i<a.length;i++){if(a[i]===a[i-1]){a.splice(i--,1)}}}}return a};k.matches=function(a,b){return k(a,null,null,b)};k.find=function(a,b,c){var d,match;if(!a){return[]}for(var i=0,l=n.order.length;i<l;i++){var e=n.order[i],match;if((match=n.leftMatch[e].exec(a))){var f=match[1];match.splice(1,1);if(f.substr(f.length-1)!=="\\"){match[1]=(match[1]||"").replace(/\\/g,"");d=n.find[e](match,b,c);if(d!=null){a=a.replace(n.match[e],"");break}}}}if(!d){d=b.getElementsByTagName("*")}return{set:d,expr:a}};k.filter=function(a,b,c,d){var e=a,result=[],curLoop=b,match,anyFound,isXMLFilter=b&&b[0]&&t(b[0]);while(a&&b.length){for(var f in n.filter){if((match=n.match[f].exec(a))!=null){var g=n.filter[f],found,item;anyFound=false;if(curLoop===result){result=[]}if(n.preFilter[f]){match=n.preFilter[f](match,curLoop,c,result,d,isXMLFilter);if(!match){anyFound=found=true}else{if(match===true){continue}}}if(match){for(var i=0;(item=curLoop[i])!=null;i++){if(item){found=g(item,match,i,curLoop);var h=d^!!found;if(c&&found!=null){if(h){anyFound=true}else{curLoop[i]=false}}else{if(h){result.push(item);anyFound=true}}}}}if(found!==C){if(!c){curLoop=result}a=a.replace(n.match[f],"");if(!anyFound){return[]}break}}}if(a===e){if(anyFound==null){throw"Syntax error, unrecognized expression: "+a}else{break}}e=a}return curLoop};var n=k.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]*)((?:\([^\)]+\)|[^\2\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")}},relative:{"+":function(a,b){var c=typeof b==="string",isTag=c&&!/\W/.test(b),isPartStrNotTag=c&&!isTag;if(isTag){b=b.toLowerCase()}for(var i=0,l=a.length,elem;i<l;i++){if((elem=a[i])){while((elem=elem.previousSibling)&&elem.nodeType!==1){}a[i]=isPartStrNotTag||elem&&elem.nodeName.toLowerCase()===b?elem||false:elem===b}}if(isPartStrNotTag){k.filter(b,a,true)}},">":function(a,b){var c=typeof b==="string";if(c&&!/\W/.test(b)){b=b.toLowerCase();for(var i=0,l=a.length;i<l;i++){var d=a[i];if(d){var e=d.parentNode;a[i]=e.nodeName.toLowerCase()===b?e:false}}}else{for(var i=0,l=a.length;i<l;i++){var d=a[i];if(d){a[i]=c?d.parentNode:d.parentNode===b}}if(c){k.filter(b,a,true)}}},"":function(a,b,c){var d=done++,checkFn=dirCheck;if(typeof b==="string"&&!/\W/.test(b)){var e=b=b.toLowerCase();checkFn=dirNodeCheck}checkFn("parentNode",b,d,a,e,c)},"~":function(a,b,c){var d=done++,checkFn=dirCheck;if(typeof b==="string"&&!/\W/.test(b)){var e=b=b.toLowerCase();checkFn=dirNodeCheck}checkFn("previousSibling",b,d,a,e,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var m=b.getElementById(a[1]);return m?[m]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!=="undefined"){var c=[],results=b.getElementsByName(a[1]);for(var i=0,l=results.length;i<l;i++){if(results[i].getAttribute("name")===a[1]){c.push(results[i])}}return c.length===0?null:c}},TAG:function(a,b){return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(/\\/g,"")+" ";if(f){return a}for(var i=0,elem;(elem=b[i])!=null;i++){if(elem){if(e^(elem.className&&(" "+elem.className+" ").replace(/[\t\n]/g," ").indexOf(a)>=0)){if(!c){d.push(elem)}}else{if(c){b[i]=false}}}}return false},ID:function(a){return a[1].replace(/\\/g,"")},TAG:function(a,b){return a[1].toLowerCase()},CHILD:function(a){if(a[1]==="nth"){var b=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=(b[1]+(b[2]||1))-0;a[3]=b[3]-0}a[0]=done++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1].replace(/\\/g,"");if(!f&&n.attrMap[g]){a[1]=n.attrMap[g]}if(a[2]==="~="){a[4]=" "+a[4]+" "}return a},PSEUDO:function(a,b,c,d,e){if(a[1]==="not"){if((j.exec(a[3])||"").length>1||/^\w/.test(a[3])){a[3]=k(a[3],null,null,b)}else{var f=k.filter(a[3],b,c,true^e);if(!c){d.push.apply(d,f)}return false}}else{if(n.match.POS.test(a[0])||n.match.CHILD.test(a[0])){return true}}return a},POS:function(a){a.unshift(true);return a}},filters:{enabled:function(a){return a.disabled===false&&a.type!=="hidden"},disabled:function(a){return a.disabled===true},checked:function(a){return a.checked===true},selected:function(a){a.parentNode.selectedIndex;return a.selected===true},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,i,b){return!!k(b[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){return"text"===a.type},radio:function(a){return"radio"===a.type},checkbox:function(a){return"checkbox"===a.type},file:function(a){return"file"===a.type},password:function(a){return"password"===a.type},submit:function(a){return"submit"===a.type},image:function(a){return"image"===a.type},reset:function(a){return"reset"===a.type},button:function(a){return"button"===a.type||a.nodeName.toLowerCase()==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)}},setFilters:{first:function(a,i){return i===0},last:function(a,i,b,c){return i===c.length-1},even:function(a,i){return i%2===0},odd:function(a,i){return i%2===1},lt:function(a,i,b){return i<b[3]-0},gt:function(a,i,b){return i>b[3]-0},nth:function(a,i,b){return b[3]-0===i},eq:function(a,i,b){return b[3]-0===i}},filter:{PSEUDO:function(a,b,i,c){var d=b[1],filter=n.filters[d];if(filter){return filter(a,i,b,c)}else{if(d==="contains"){return(a.textContent||a.innerText||getText([a])||"").indexOf(b[3])>=0}else{if(d==="not"){var e=b[3];for(var i=0,l=e.length;i<l;i++){if(e[i]===a){return false}}return true}else{throw"Syntax error, unrecognized expression: "+d}}}},CHILD:function(a,b){var c=b[1],node=a;switch(c){case"only":case"first":while((node=node.previousSibling)){if(node.nodeType===1){return false}}if(c==="first"){return true}node=a;case"last":while((node=node.nextSibling)){if(node.nodeType===1){return false}}return true;case"nth":var d=b[2],last=b[3];if(d===1&&last===0){return true}var e=b[0],parent=a.parentNode;if(parent&&(parent.sizcache!==e||!a.nodeIndex)){var f=0;for(node=parent.firstChild;node;node=node.nextSibling){if(node.nodeType===1){node.nodeIndex=++f}}parent.sizcache=e}var g=a.nodeIndex-last;if(d===0){return g===0}else{return(g%d===0&&g/d>=0)}}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return(b==="*"&&a.nodeType===1)||a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],result=n.attrHandle[c]?n.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),value=result+"",p=b[2],check=b[4];return result==null?p==="!=":p==="="?value===check:p==="*="?value.indexOf(check)>=0:p==="~="?(" "+value+" ").indexOf(check)>=0:!check?value&&result!==false:p==="!="?value!==check:p==="^="?value.indexOf(check)===0:p==="$="?value.substr(value.length-check.length)===check:p==="|="?value===check||value.substr(0,check.length+1)===check+"-":false},POS:function(a,b,i,c){var d=b[2],filter=n.setFilters[d];if(filter){return filter(a,i,b,c)}}}};var o=n.match.POS;for(var p in n.match){n.match[p]=new RegExp(n.match[p].source+/(?![^\[]*\])(?![^\(]*\))/.source);n.leftMatch[p]=new RegExp(/(^(?:.|\r|\n)*?)/.source+n.match[p].source)}var q=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(document.documentElement.childNodes,0)}catch(e){q=function(a,b){var c=b||[];if(toString.call(a)==="[object Array]"){Array.prototype.push.apply(c,a)}else{if(typeof a.length==="number"){for(var i=0,l=a.length;i<l;i++){c.push(a[i])}}else{for(var i=0;a[i];i++){c.push(a[i])}}}return c}}var r;if(document.documentElement.compareDocumentPosition){r=function(a,b){if(!a.compareDocumentPosition||!b.compareDocumentPosition){if(a==b){hasDuplicate=true}return a.compareDocumentPosition?-1:1}var c=a.compareDocumentPosition(b)&4?-1:a===b?0:1;if(c===0){hasDuplicate=true}return c}}else{if("sourceIndex"in document.documentElement){r=function(a,b){if(!a.sourceIndex||!b.sourceIndex){if(a==b){hasDuplicate=true}return a.sourceIndex?-1:1}var c=a.sourceIndex-b.sourceIndex;if(c===0){hasDuplicate=true}return c}}else{if(document.createRange){r=function(a,b){if(!a.ownerDocument||!b.ownerDocument){if(a==b){hasDuplicate=true}return a.ownerDocument?-1:1}var c=a.ownerDocument.createRange(),bRange=b.ownerDocument.createRange();c.setStart(a,0);c.setEnd(a,0);bRange.setStart(b,0);bRange.setEnd(b,0);var d=c.compareBoundaryPoints(Range.START_TO_END,bRange);if(d===0){hasDuplicate=true}return d}}}}function getText(a){var b="",elem;for(var i=0;a[i];i++){elem=a[i];if(elem.nodeType===3||elem.nodeType===4){b+=elem.nodeValue}else{if(elem.nodeType!==8){b+=getText(elem.childNodes)}}}return b}(function(){var d=document.createElement("div"),id="script"+(new Date).getTime();d.innerHTML="<a name='"+id+"'/>";var e=document.documentElement;e.insertBefore(d,e.firstChild);if(document.getElementById(id)){n.find.ID=function(a,b,c){if(typeof b.getElementById!=="undefined"&&!c){var m=b.getElementById(a[1]);return m?m.id===a[1]||typeof m.getAttributeNode!=="undefined"&&m.getAttributeNode("id").nodeValue===a[1]?[m]:C:[]}};n.filter.ID=function(a,b){var c=typeof a.getAttributeNode!=="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}}e.removeChild(d);e=d=null})();(function(){var e=document.createElement("div");e.appendChild(document.createComment(""));if(e.getElementsByTagName("*").length>0){n.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var i=0;c[i];i++){if(c[i].nodeType===1){d.push(c[i])}}c=d}return c}}e.innerHTML="<a href='#'></a>";if(e.firstChild&&typeof e.firstChild.getAttribute!=="undefined"&&e.firstChild.getAttribute("href")!=="#"){n.attrHandle.href=function(a){return a.getAttribute("href",2)}}e=null})();if(document.querySelectorAll){(function(){var f=k,div=document.createElement("div");div.innerHTML="<p class='TEST'></p>";if(div.querySelectorAll&&div.querySelectorAll(".TEST").length===0){return}k=function(a,b,c,d){b=b||document;if(!d&&b.nodeType===9&&!t(b)){try{return q(b.querySelectorAll(a),c)}catch(e){}}return f(a,b,c,d)};for(var g in f){k[g]=f[g]}div=null})()}(function(){var d=document.createElement("div");d.innerHTML="<div class='test e'></div><div class='test'></div>";if(!d.getElementsByClassName||d.getElementsByClassName("e").length===0){return}d.lastChild.className="e";if(d.getElementsByClassName("e").length===1){return}n.order.splice(1,0,"CLASS");n.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!=="undefined"&&!c){return b.getElementsByClassName(a[1])}};d=null})();function dirNodeCheck(a,b,c,d,e,f){for(var i=0,l=d.length;i<l;i++){var g=d[i];if(g){g=g[a];var h=false;while(g){if(g.sizcache===c){h=d[g.sizset];break}if(g.nodeType===1&&!f){g.sizcache=c;g.sizset=i}if(g.nodeName.toLowerCase()===b){h=g;break}g=g[a]}d[i]=h}}}function dirCheck(a,b,c,d,e,f){for(var i=0,l=d.length;i<l;i++){var g=d[i];if(g){g=g[a];var h=false;while(g){if(g.sizcache===c){h=d[g.sizset];break}if(g.nodeType===1){if(!f){g.sizcache=c;g.sizset=i}if(typeof b!=="string"){if(g===b){h=true;break}}else{if(k.filter(b,[g]).length>0){h=g;break}}}g=g[a]}d[i]=h}}}var s=document.compareDocumentPosition?function(a,b){return a.compareDocumentPosition(b)&16}:function(a,b){return a!==b&&(a.contains?a.contains(b):true)};var t=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":false};var u=function(a,b){var c=[],later="",match,root=b.nodeType?[b]:b;while((match=n.match.PSEUDO.exec(a))){later+=match[0];a=a.replace(n.match.PSEUDO,"")}a=n.relative[a]?a+"*":a;for(var i=0,l=root.length;i<l;i++){k(a,root[i],c)}return k.filter(later,c)};return k})();S.flash=(function(){var A=function(){var w="undefined",OBJECT="object",SHOCKWAVE_FLASH="Shockwave Flash",SHOCKWAVE_FLASH_AX="ShockwaveFlash.ShockwaveFlash",FLASH_MIME_TYPE="application/x-shockwave-flash",EXPRESS_INSTALL_ID="SWFObjectExprInst",win=B,doc=document,nav=navigator,domLoadFnArr=[],regObjArr=[],objIdArr=[],listenersArr=[],script,timer=null,storedAltContent=null,storedAltContentId=null,isDomLoaded=false,isExpressInstallActive=false;var x=function(){var b=typeof doc.getElementById!=w&&typeof doc.getElementsByTagName!=w&&typeof doc.createElement!=w,playerVersion=[0,0,0],d=null;if(typeof nav.plugins!=w&&typeof nav.plugins[SHOCKWAVE_FLASH]==OBJECT){d=nav.plugins[SHOCKWAVE_FLASH].description;if(d&&!(typeof nav.mimeTypes!=w&&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!=w){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);return{w3cdom:b,pv:playerVersion,webkit:webkit,ie:ie,win:windows,mac:mac}}();var y=function(){if(!x.w3cdom){return}addDomLoadEvent(main);if(x.ie&&x.win){try{doc.write("<script id=__ie_ondomload defer=true src=//:><\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(x.webkit&&typeof doc.readyState!=w){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=w){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return}if(x.ie&&x.win){var s=createElement("span");try{var t=doc.getElementsByTagName("body")[0].appendChild(s);t.parentNode.removeChild(t)}catch(e){return}}isDomLoaded=true;if(timer){clearInterval(timer);timer=null}var a=domLoadFnArr.length;for(var i=0;i<a;i++){domLoadFnArr[i]()}}function addDomLoadEvent(a){if(isDomLoaded){a()}else{domLoadFnArr[domLoadFnArr.length]=a}}function addLoadEvent(a){if(typeof win.addEventListener!=w){win.addEventListener("load",a,false)}else{if(typeof doc.addEventListener!=w){doc.addEventListener("load",a,false)}else{if(typeof win.attachEvent!=w){addListener(win,"onload",a)}else{if(typeof win.onload=="function"){var b=win.onload;win.onload=function(){b();a()}}else{win.onload=a}}}}}function main(){var a=regObjArr.length;for(var i=0;i<a;i++){var b=regObjArr[i].id;if(x.pv[0]>0){var c=getElementById(b);if(c){regObjArr[i].width=c.getAttribute("width")?c.getAttribute("width"):"0";regObjArr[i].height=c.getAttribute("height")?c.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(x.webkit&&x.webkit<312){fixParams(c)}setVisibility(b,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(x.win||x.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(c)}}}}else{setVisibility(b,true)}}}function fixParams(b){var d=b.getElementsByTagName(OBJECT)[0];if(d){var e=createElement("embed"),a=d.attributes;if(a){var f=a.length;for(var i=0;i<f;i++){if(a[i].nodeName=="DATA"){e.setAttribute("src",a[i].nodeValue)}else{e.setAttribute(a[i].nodeName,a[i].nodeValue)}}}var c=d.childNodes;if(c){var g=c.length;for(var j=0;j<g;j++){if(c[j].nodeType==1&&c[j].nodeName=="PARAM"){e.setAttribute(c[j].getAttribute("name"),c[j].getAttribute("value"))}}}b.parentNode.replaceChild(e,b)}}function showExpressInstall(a){isExpressInstallActive=true;var b=getElementById(a.id);if(b){if(a.altContentId){var c=getElementById(a.altContentId);if(c){storedAltContent=c;storedAltContentId=a.altContentId}}else{storedAltContent=abstractAltContent(b)}if(!(/%$/.test(a.width))&&parseInt(a.width,10)<310){a.width="310"}if(!(/%$/.test(a.height))&&parseInt(a.height,10)<137){a.height="137"}doc.title=doc.title.slice(0,47)+" - Flash Player Installation";var d=x.ie&&x.win?"ActiveX":"PlugIn",dt=doc.title,fv="MMredirectURL="+win.location+"&MMplayerType="+d+"&MMdoctitle="+dt,replaceId=a.id;if(x.ie&&x.win&&b.readyState!=4){var e=createElement("div");replaceId+="SWFObjectNew";e.setAttribute("id",replaceId);b.parentNode.insertBefore(e,b);b.style.display="none";var f=function(){b.parentNode.removeChild(b)};addListener(win,"onload",f)}createSWF({data:a.expressInstall,id:EXPRESS_INSTALL_ID,width:a.width,height:a.height},{flashvars:fv},replaceId)}}function displayAltContent(a){if(x.ie&&x.win&&a.readyState!=4){var b=createElement("div");a.parentNode.insertBefore(b,a);b.parentNode.replaceChild(abstractAltContent(a),b);a.style.display="none";var c=function(){a.parentNode.removeChild(a)};addListener(win,"onload",c)}else{a.parentNode.replaceChild(abstractAltContent(a),a)}}function abstractAltContent(a){var b=createElement("div");if(x.win&&x.ie){b.innerHTML=a.innerHTML}else{var d=a.getElementsByTagName(OBJECT)[0];if(d){var c=d.childNodes;if(c){var e=c.length;for(var i=0;i<e;i++){if(!(c[i].nodeType==1&&c[i].nodeName=="PARAM")&&!(c[i].nodeType==8)){b.appendChild(c[i].cloneNode(true))}}}}}return b}function createSWF(a,b,c){var r,el=getElementById(c);if(el){if(typeof a.id==w){a.id=c}if(x.ie&&x.win){var d="";for(var i in a){if(a[i]!=Object.prototype[i]){if(i.toLowerCase()=="data"){b.movie=a[i]}else{if(i.toLowerCase()=="styleclass"){d+=' class="'+a[i]+'"'}else{if(i.toLowerCase()!="classid"){d+=" "+i+'="'+a[i]+'"'}}}}}var f="";for(var j in b){if(b[j]!=Object.prototype[j]){f+='<param name="'+j+'" value="'+b[j]+'" />'}}el.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+d+">"+f+"</object>";objIdArr[objIdArr.length]=a.id;r=getElementById(a.id)}else{if(x.webkit&&x.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in a){if(a[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",a[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",a[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,a[k])}}}}}for(var l in b){if(b[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,b[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in a){if(a[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",a[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,a[m])}}}}for(var n in b){if(b[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,b[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(a,b,c){var p=createElement("param");p.setAttribute("name",b);p.setAttribute("value",c);a.appendChild(p)}function removeSWF(a){var b=getElementById(a);if(b&&(b.nodeName=="OBJECT"||b.nodeName=="EMBED")){if(x.ie&&x.win){if(b.readyState==4){removeObjectInIE(a)}else{win.attachEvent("onload",function(){removeObjectInIE(a)})}}else{b.parentNode.removeChild(b)}}}function removeObjectInIE(a){var b=getElementById(a);if(b){for(var i in b){if(typeof b[i]=="function"){b[i]=null}}b.parentNode.removeChild(b)}}function getElementById(a){var b=null;try{b=doc.getElementById(a)}catch(e){}return b}function createElement(a){return doc.createElement(a)}function addListener(a,b,c){a.attachEvent(b,c);listenersArr[listenersArr.length]=[a,b,c]}function hasPlayerVersion(a){var b=x.pv,v=a.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return(b[0]>v[0]||(b[0]==v[0]&&b[1]>v[1])||(b[0]==v[0]&&b[1]==v[1]&&b[2]>=v[2]))?true:false}function createCSS(a,b){if(x.ie&&x.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(x.ie&&x.win)&&typeof doc.createTextNode!=w){s.appendChild(doc.createTextNode(a+" {"+b+"}"))}h.appendChild(s);if(x.ie&&x.win&&typeof doc.styleSheets!=w&&doc.styleSheets.length>0){var c=doc.styleSheets[doc.styleSheets.length-1];if(typeof c.addRule==OBJECT){c.addRule(a,b)}}}function setVisibility(a,b){var v=b?"visible":"hidden";if(isDomLoaded&&getElementById(a)){getElementById(a).style.visibility=v}else{createCSS("#"+a,"visibility:"+v)}}function urlEncodeIfNecessary(s){var a=/[\\\"<>\.;]/;var b=a.exec(s)!=null;return b?encodeURIComponent(s):s}var z=function(){if(x.ie&&x.win){B.attachEvent("onunload",function(){var a=listenersArr.length;for(var i=0;i<a;i++){listenersArr[i][0].detachEvent(listenersArr[i][1],listenersArr[i][2])}var b=objIdArr.length;for(var j=0;j<b;j++){removeSWF(objIdArr[j])}for(var k in x){x[k]=null}x=null;for(var l in A){A[l]=null}A=null})}}();return{registerObject:function(a,b,c){if(!x.w3cdom||!a||!b){return}var d={};d.id=a;d.swfVersion=b;d.expressInstall=c?c:false;regObjArr[regObjArr.length]=d;setVisibility(a,false)},getObjectById:function(a){var r=null;if(x.w3cdom){var o=getElementById(a);if(o){var n=o.getElementsByTagName(OBJECT)[0];if(!n||(n&&typeof o.SetVariable!=w)){r=o}else{if(typeof n.SetVariable!=w){r=n}}}}return r},embedSWF:function(b,c,d,e,f,g,h,l,m){if(!x.w3cdom||!b||!c||!d||!e||!f){return}d+="";e+="";if(hasPlayerVersion(f)){setVisibility(c,false);var n={};if(m&&typeof m===OBJECT){for(var i in m){if(m[i]!=Object.prototype[i]){n[i]=m[i]}}}n.data=b;n.width=d;n.height=e;var o={};if(l&&typeof l===OBJECT){for(var j in l){if(l[j]!=Object.prototype[j]){o[j]=l[j]}}}if(h&&typeof h===OBJECT){for(var k in h){if(h[k]!=Object.prototype[k]){if(typeof o.flashvars!=w){o.flashvars+="&"+k+"="+h[k]}else{o.flashvars=k+"="+h[k]}}}}addDomLoadEvent(function(){createSWF(n,o,c);if(n.id==c){setVisibility(c,true)}})}else{if(g&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(x.win||x.mac)){isExpressInstallActive=true;setVisibility(c,false);addDomLoadEvent(function(){var a={};a.id=a.altContentId=c;a.width=d;a.height=e;a.expressInstall=g;showExpressInstall(a)})}}},getFlashPlayerVersion:function(){return{major:x.pv[0],minor:x.pv[1],release:x.pv[2]}},hasFlashPlayerVersion:hasPlayerVersion,createSWF:function(a,b,c){if(x.w3cdom){return createSWF(a,b,c)}else{return C}},removeSWF:function(a){if(x.w3cdom){removeSWF(a)}},createCSS:function(a,b){if(x.w3cdom){createCSS(a,b)}},addDomLoadEvent:addDomLoadEvent,addLoadEvent:addLoadEvent,getQueryParamValue:function(a){var q=doc.location.search||doc.location.hash;if(a==null){return urlEncodeIfNecessary(q)}if(q){var b=q.substring(1).split("&");for(var i=0;i<b.length;i++){if(b[i].substring(0,b[i].indexOf("="))==a){return urlEncodeIfNecessary(b[i].substring((b[i].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(isExpressInstallActive&&storedAltContent){var a=getElementById(EXPRESS_INSTALL_ID);if(a){a.parentNode.replaceChild(storedAltContent,a);if(storedAltContentId){setVisibility(storedAltContentId,true);if(x.ie&&x.win){storedAltContent.style.display="block"}}storedAltContent=null;storedAltContentId=null;isExpressInstallActive=false}}}}}();return A})();S.lang={code:"cs",of:"z(e)",loading:"nahrávám",cancel:"Zrušit",next:"Další",previous:"Předchozí",play:"Přehrát",pause:"Pauza",close:"Zavřít",errors:{single:'Pro správné zobrazení je potřeba nainstalovat tento zásuvný modul do Vašeho prohlížeče: <a href="{0}">{1}</a>.',shared:'Pro správné zobrazení je potřeba nainstalovat oba tyto zásuvné moduly do Vašeho prohlížeče: <a href="{0}">{1}</a> a <a href="{2}">{3}</a>.',either:'Pro správné zobrazení je potřeba do Vašeho prohlížeče nainstalovat jeden z následujících zásuvných modulů: <a href="{0}">{1}</a> nebo <a href="{2}">{3}</a>.'}};var N,proxyId="sb-drag-proxy",dragData,dragProxy,dragTarget;function resetDrag(){dragData={x:0,y:0,startX:null,startY:null}}function updateProxy(){var a=S.dimensions;apply(dragProxy.style,{height:a.innerHeight+"px",width:a.innerWidth+"px"})}function enableDrag(){resetDrag();var a=["position:absolute","cursor:"+(S.isGecko?"-moz-grab":"move"),"background-color:"+(S.isIE?"#fff;filter:alpha(opacity=0)":"transparent")].join(";");S.appendHTML(S.skin.body,'<div id="'+proxyId+'" style="'+a+'"></div>');dragProxy=get(proxyId);updateProxy();addEvent(dragProxy,"mousedown",startDrag)}function disableDrag(){if(dragProxy){removeEvent(dragProxy,"mousedown",startDrag);remove(dragProxy);dragProxy=null}dragTarget=null}function startDrag(e){preventDefault(e);var a=getPageXY(e);dragData.startX=a[0];dragData.startY=a[1];dragTarget=get(S.player.id);addEvent(document,"mousemove",positionDrag);addEvent(document,"mouseup",endDrag);if(S.isGecko){dragProxy.style.cursor="-moz-grabbing"}}function positionDrag(e){var a=S.player,dims=S.dimensions,xy=getPageXY(e);var b=xy[0]-dragData.startX;dragData.startX+=b;dragData.x=Math.max(Math.min(0,dragData.x+b),dims.innerWidth-a.width);var c=xy[1]-dragData.startY;dragData.startY+=c;dragData.y=Math.max(Math.min(0,dragData.y+c),dims.innerHeight-a.height);apply(dragTarget.style,{left:dragData.x+"px",top:dragData.y+"px"})}function endDrag(){removeEvent(document,"mousemove",positionDrag);removeEvent(document,"mouseup",endDrag);if(S.isGecko){dragProxy.style.cursor="-moz-grab"}}S.img=function(a,b){this.obj=a;this.id=b;this.ready=false;var c=this;N=new Image();N.onload=function(){c.height=a.height?parseInt(a.height,10):N.height;c.width=a.width?parseInt(a.width,10):N.width;c.ready=true;N.onload=null;N=null};N.src=a.content};S.img.ext=["bmp","gif","jpg","jpeg","png"];S.img.prototype={append:function(a,b){var c=document.createElement("img");c.id=this.id;c.src=this.obj.content;c.style.position="absolute";var d,width;if(b.oversized&&S.options.handleOversize=="resize"){d=b.innerHeight;width=b.innerWidth}else{d=this.height;width=this.width}c.setAttribute("height",d);c.setAttribute("width",width);a.appendChild(c)},remove:function(){var a=get(this.id);if(a){remove(a)}disableDrag();if(N){N.onload=null;N=null}},onLoad:function(){var a=S.dimensions;if(a.oversized&&S.options.handleOversize=="drag"){enableDrag()}},onWindowResize:function(){var a=S.dimensions;switch(S.options.handleOversize){case"resize":var b=get(this.id);b.height=a.innerHeight;b.width=a.innerWidth;break;case"drag":if(dragTarget){var c=parseInt(S.getStyle(dragTarget,"top")),left=parseInt(S.getStyle(dragTarget,"left"));if(c+this.height<a.innerHeight){dragTarget.style.top=a.innerHeight-this.height+"px"}if(left+this.width<a.innerWidth){dragTarget.style.left=a.innerWidth-this.width+"px"}updateProxy()}break}}};S.iframe=function(a,b){this.obj=a;this.id=b;var c=get("sb-overlay");this.height=a.height?parseInt(a.height,10):c.offsetHeight;this.width=a.width?parseInt(a.width,10):c.offsetWidth};S.iframe.prototype={append:function(a,b){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(S.isIE){c+=' allowtransparency="true"';if(S.isIE6){c+=" src=\"javascript:false;document.write('');\""}}c+="></iframe>";a.innerHTML=c},remove:function(){var a=get(this.id);if(a){remove(a);if(S.isGecko){delete B.frames[this.id]}}},onLoad:function(){var a=S.isIE?get(this.id).contentWindow:B.frames[this.id];a.location.href=this.obj.content}};S.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};S.html.prototype={append:function(a,b){var c=document.createElement("div");c.id=this.id;c.className="html";c.innerHTML=this.obj.content;a.appendChild(c)},remove:function(){var a=get(this.id);if(a){remove(a)}}};S.swf=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):300};S.swf.ext=["swf"];S.swf.prototype={append:function(a,b){var c=document.createElement("div");c.id=this.id;a.appendChild(c);var d=b.innerHeight,width=b.innerWidth,swf=this.obj.content,version=S.options.flashVersion,express=S.path()+"expressInstall.swf",flashvars=S.options.flashVars,params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,d,version,express,flashvars,params)},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id)},onWindowResize:function(){var a=S.dimensions,el=get(this.id);el.height=a.innerHeight;el.width=a.innerWidth}};var O=20;S.flv=function(a,b){this.obj=a;this.id=b;this.height=a.height?parseInt(a.height,10):300;if(S.options.showMovieControls){this.height+=O}this.width=a.width?parseInt(a.width,10):300};S.flv.ext=["flv","m4v"];S.flv.prototype={append:function(a,b){var c=document.createElement("div");c.id=this.id;a.appendChild(c);var d=b.innerHeight,width=b.innerWidth,swf=S.path()+"player.swf",version=S.options.flashVersion,express=S.path()+"expressInstall.swf",flashvars=apply({file:this.obj.content,height:d,width:width,autostart:(S.options.autoplayMovies?"true":"false"),controlbar:(S.options.showMovieControls?"bottom":"none"),backcolor:"0x000000",frontcolor:"0xCCCCCC",lightcolor:"0x557722"},S.options.flashVars),params=S.options.flashParams;S.flash.embedSWF(swf,this.id,width,d,version,express,flashvars,params)},remove:function(){S.flash.expressInstallCallback();S.flash.removeSWF(this.id)},onWindowResize:function(){var a=S.dimensions,el=get(this.id);el.height=a.innerHeight;el.width=a.innerWidth}};var P=16;S.qt=function(a,b){this.obj=a;this.id=b;this.height=a.height?parseInt(a.height,10):300;if(S.options.showMovieControls){this.height+=P}this.width=a.width?parseInt(a.width,10):300};S.qt.ext=["dv","mov","moov","movie","mp4","avi","mpg","mpeg"];S.qt.prototype={append:function(a,b){var c=S.options,autoplay=String(c.autoplayMovies),controls=String(c.showMovieControls);var d="<object",movie={id:this.id,name:this.id,height:this.height,width:this.width,kioskmode:"true"};if(S.isIE){movie.classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B";movie.codebase="http://www.apple.com/qtactivex/qtplugin.cab#version=6,0,2,0"}else{movie.type="video/quicktime";movie.data=this.obj.content}for(var m in movie){d+=" "+m+'="'+movie[m]+'"'}d+=">";var e={src:this.obj.content,scale:"aspect",controller:controls,autoplay:autoplay};for(var p in e){d+='<param name="'+p+'" value="'+e[p]+'">'}d+="</object>";a.innerHTML=d},remove:function(){try{document[this.id].Stop()}catch(e){}var a=get(this.id);if(a){remove(a)}}};var Q=(S.isIE?70:45);S.wmp=function(a,b){this.obj=a;this.id=b;this.height=a.height?parseInt(a.height,10):300;if(S.options.showMovieControls){this.height+=Q}this.width=a.width?parseInt(a.width,10):300};S.wmp.ext=["asf","avi","mpg","mpeg","wm","wmv"];S.wmp.prototype={append:function(a,b){var c=S.options,autoplay=c.autoplayMovies?1:0;var d='<object id="'+this.id+'" name="'+this.id+'" height="'+this.height+'" width="'+this.width+'"',params={autostart:c.autoplayMovies?1:0};if(S.isIE){d+=' classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6"';params.url=this.obj.content;params.uimode=c.showMovieControls?"full":"none"}else{d+=' type="video/x-ms-wmv"';d+=' data="'+this.obj.content+'"';params.showcontrols=c.showMovieControls?1:0}d+=">";for(var p in params){d+='<param name="'+p+'" value="'+params[p]+'">'}d+="</object>";a.innerHTML=d},remove:function(){if(S.isIE){try{B[this.id].controls.stop();B[this.id].URL="movie"+now()+".wmv";B[this.id]=function(){}}catch(e){}}var a=get(this.id);if(a){setTimeout(function(){remove(a)},10)}}};var R=false,visibilityCache=[],pngIds=["sb-nav-close","sb-nav-next","sb-nav-play","sb-nav-pause","sb-nav-previous"],container,overlay,wrapper,doWindowResize=true;function animate(c,d,e,f,g){var h=(d=="opacity"),anim=h?S.setOpacity:function(a,b){a.style[d]=""+b+"px"};if(f==0||(!h&&!S.options.animate)||(h&&!S.options.animateFade)){anim(c,e);if(g){g()}return}var i=parseFloat(S.getStyle(c,d))||0;var j=e-i;if(j==0){if(g){g()}return}f*=1000;var k=now(),ease=S.ease,end=k+f,time;var l=setInterval(function(){time=now();if(time>=end){clearInterval(l);l=null;anim(c,e);if(g){g()}}else{anim(c,i+ease((time-k)/f)*j)}},10)}function setSize(){container.style.height=S.getWindowSize("Height")+"px";container.style.width=S.getWindowSize("Width")+"px"}function setPosition(){container.style.top=document.documentElement.scrollTop+"px";container.style.left=document.documentElement.scrollLeft+"px"}function toggleTroubleElements(c){if(c){each(visibilityCache,function(i,a){a[0].style.visibility=a[1]||""})}else{visibilityCache=[];each(S.options.troubleElements,function(i,b){each(document.getElementsByTagName(b),function(j,a){visibilityCache.push([a,a.style.visibility]);a.style.visibility="hidden"})})}}function toggleNav(a,b){var c=get("sb-nav-"+a);if(c){c.style.display=b?"":"none"}}function toggleLoading(a,b){var c=get("sb-loading"),playerName=S.getCurrent().player,anim=(playerName=="img"||playerName=="html");if(a){S.setOpacity(c,0);c.style.display="block";var d=function(){S.clearOpacity(c);if(b){b()}};if(anim){animate(c,"opacity",1,S.options.fadeDuration,d)}else{d()}}else{var d=function(){c.style.display="none";S.clearOpacity(c);if(b){b()}};if(anim){animate(c,"opacity",0,S.options.fadeDuration,d)}else{d()}}}function buildBars(a){var b=S.getCurrent();get("sb-title-inner").innerHTML=b.title||"";var c,next,play,pause,previous;if(S.options.displayNav){c=true;var d=S.gallery.length;if(d>1){if(S.options.continuous){next=previous=true}else{next=(d-1)>S.current;previous=S.current>0}}if(S.options.slideshowDelay>0&&S.hasNext()){pause=!S.isPaused();play=!pause}}else{c=next=play=pause=previous=false}toggleNav("close",c);toggleNav("next",next);toggleNav("play",play);toggleNav("pause",pause);toggleNav("previous",previous);var e="";if(S.options.displayCounter&&S.gallery.length>1){var d=S.gallery.length;if(S.options.counterType=="skip"){var i=0,end=d,limit=parseInt(S.options.counterLimit)||0;if(limit<d&&limit>2){var h=Math.floor(limit/2);i=S.current-h;if(i<0){i+=d}end=S.current+(limit-h);if(end>d){end-=d}}while(i!=end){if(i==d){i=0}e+='<a onclick="Shadowbox.change('+i+');"';if(i==S.current){e+=' class="sb-counter-current"'}e+=">"+(++i)+"</a>"}}else{e=[S.current+1,S.lang.of,d].join(" ")}}get("sb-counter").innerHTML=e;a()}function showBars(a){var b=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=0.35;b.style.visibility=infoInner.style.visibility="";if(b.innerHTML!=""){animate(b,"marginTop",0,duration)}animate(infoInner,"marginTop",0,duration,a)}function hideBars(a,b){var c=get("sb-title"),info=get("sb-info"),titleHeight=c.offsetHeight,infoHeight=info.offsetHeight,titleInner=get("sb-title-inner"),infoInner=get("sb-info-inner"),duration=(a?0.35:0);animate(titleInner,"marginTop",titleHeight,duration);animate(infoInner,"marginTop",infoHeight*-1,duration,function(){titleInner.style.visibility=infoInner.style.visibility="hidden";b()})}function adjustHeight(a,b,c,d){var e=get("sb-wrapper-inner"),duration=(c?S.options.resizeDuration:0);animate(wrapper,"top",b,duration);animate(e,"height",a,duration,d)}function adjustWidth(a,b,c,d){var e=(c?S.options.resizeDuration:0);animate(wrapper,"left",b,e);animate(wrapper,"width",a,e,d)}function setDimensions(a,b){var c=get("sb-body-inner"),a=parseInt(a),b=parseInt(b),topBottom=wrapper.offsetHeight-c.offsetHeight,leftRight=wrapper.offsetWidth-c.offsetWidth,maxHeight=overlay.offsetHeight,maxWidth=overlay.offsetWidth,padding=parseInt(S.options.viewportPadding)||20,preserveAspect=(S.player&&S.options.handleOversize!="drag");return S.setDimensions(a,b,maxHeight,maxWidth,topBottom,leftRight,padding,preserveAspect)}var K={};K.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>';K.options={animSequence:"sync",counterLimit:10,counterType:"default",displayCounter:true,displayNav:true,fadeDuration:0.35,initialHeight:160,initialWidth:320,modal:false,overlayColor:"#000",overlayOpacity:0.5,resizeDuration:0.35,showOverlay:true,troubleElements:["select","object","embed","canvas"]};K.init=function(){S.appendHTML(document.body,sprintf(K.markup,S.lang));K.body=get("sb-body-inner");container=get("sb-container");overlay=get("sb-overlay");wrapper=get("sb-wrapper");if(!supportsFixed){container.style.position="absolute"}if(!G){var b,m,re=/url\("(.*\.png)"\)/;each(pngIds,function(i,a){b=get(a);if(b){m=S.getStyle(b,"backgroundImage").match(re);if(m){b.style.backgroundImage="none";b.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,src="+m[1]+",sizingMethod=scale);"}}})}var c;addEvent(B,"resize",function(){if(c){clearTimeout(c);c=null}if(F){c=setTimeout(K.onWindowResize,10)}})};K.onOpen=function(a,b){doWindowResize=false;container.style.display="block";setSize();var c=setDimensions(S.options.initialHeight,S.options.initialWidth);adjustHeight(c.innerHeight,c.top);adjustWidth(c.width,c.left);if(S.options.showOverlay){overlay.style.backgroundColor=S.options.overlayColor;S.setOpacity(overlay,0);if(!S.options.modal){addEvent(overlay,"click",S.close)}R=true}if(!supportsFixed){setPosition();addEvent(B,"scroll",setPosition)}toggleTroubleElements();container.style.visibility="visible";if(R){animate(overlay,"opacity",S.options.overlayOpacity,S.options.fadeDuration,b)}else{b()}};K.onLoad=function(a,b){toggleLoading(true);while(K.body.firstChild){remove(K.body.firstChild)}hideBars(a,function(){if(!F){return}if(!a){wrapper.style.visibility="visible"}buildBars(b)})};K.onReady=function(a){if(!F){return}var b=S.player,dims=setDimensions(b.height,b.width);var c=function(){showBars(a)};switch(S.options.animSequence){case"hw":adjustHeight(dims.innerHeight,dims.top,true,function(){adjustWidth(dims.width,dims.left,true,c)});break;case"wh":adjustWidth(dims.width,dims.left,true,function(){adjustHeight(dims.innerHeight,dims.top,true,c)});break;default:adjustWidth(dims.width,dims.left,true);adjustHeight(dims.innerHeight,dims.top,true,c)}};K.onShow=function(a){toggleLoading(false,a);doWindowResize=true};K.onClose=function(){if(!supportsFixed){removeEvent(B,"scroll",setPosition)}removeEvent(overlay,"click",S.close);wrapper.style.visibility="hidden";var a=function(){container.style.visibility="hidden";container.style.display="none";toggleTroubleElements(true)};if(R){animate(overlay,"opacity",0,S.options.fadeDuration,a)}else{a()}};K.onPlay=function(){toggleNav("play",false);toggleNav("pause",true)};K.onPause=function(){toggleNav("pause",false);toggleNav("play",true)};K.onWindowResize=function(){if(!doWindowResize){return}setSize();var a=S.player,dims=setDimensions(a.height,a.width);adjustWidth(dims.width,dims.left);adjustHeight(dims.innerHeight,dims.top);if(a.onWindowResize){a.onWindowResize()}};S.skin=K;B.Shadowbox=S})(window);
