(function(window,undefined){var S={version:"3.0.3"};var ua=navigator.userAgent.toLowerCase();if(ua.indexOf("windows")>-1||ua.indexOf("win32")>-1){S.isWindows=true}else{if(ua.indexOf("macintosh")>-1||ua.indexOf("mac os x")>-1){S.isMac=true}else{if(ua.indexOf("linux")>-1){S.isLinux=true}}}S.isIE=ua.indexOf("msie")>-1;S.isIE6=ua.indexOf("msie 6")>-1;S.isIE7=ua.indexOf("msie 7")>-1;S.isGecko=ua.indexOf("gecko")>-1&&ua.indexOf("safari")==-1;S.isWebKit=ua.indexOf("applewebkit/")>-1;var inlineId=/#(.+)$/,galleryName=/^(light|shadow)box\[(.*?)\]/i,inlineParam=/\s*([a-z_]*?)\s*=\s*(.+)\s*/,fileExtension=/[0-9a-z]+$/i,scriptPath=/(.+\/)shadowbox\.js/i;var open=false,initialized=false,lastOptions={},slideDelay=0,slideStart,slideTimer;S.current=-1;S.dimensions=null;S.ease=function(a){return 1+Math.pow(a-1,3)};S.errorInfo={fla:{name:"Flash",url:"http://www.adobe.com/products/flashplayer/"},qt:{name:"QuickTime",url:"http://www.apple.com/quicktime/download/"},wmp:{name:"Windows Media Player",url:"http://www.microsoft.com/windows/windowsmedia/"},f4m:{name:"Flip4Mac",url:"http://www.flip4mac.com/wmv_download.htm"}};S.gallery=[];S.onReady=noop;S.path="http://wodgame.ru/wp-content/uploads/shadowbox-js/src/";S.player=null;S.playerId="sb-player";S.options={animate:true,animateFade:true,autoplayMovies:true,continuous:false,enableKeys:true,flashParams:{bgcolor:"#000000",allowfullscreen:true},flashVars:{},flashVersion:"9.0.115",handleOversize:"resize",handleUnsupported:"link",onChange:noop,onClose:noop,onFinish:noop,onOpen:noop,showMovieControls:true,skipSetup:false,slideshowDelay:0,viewportPadding:20};S.getCurrent=function(){return S.current>-1?S.gallery[S.current]:null};S.hasNext=function(){return S.gallery.length>1&&(S.current!=S.gallery.length-1||S.options.continuous)};S.isOpen=function(){return open};S.isPaused=function(){return slideTimer=="pause"};S.applyOptions=function(a){lastOptions=apply({},S.options);apply(S.options,a)};S.revertOptions=function(){apply(S.options,lastOptions)};S.init=function(c,f){if(initialized){return}initialized=true;if(S.skin.options){apply(S.options,S.skin.options)}if(c){apply(S.options,c)}if(!S.path){var e,b=document.getElementsByTagName("script");for(var d=0,a=b.length;dm){o=m-i}var c=2*k+a;if(f+c>n){f=n-c}var b=(j-o)/j,l=(d-f)/d,g=b>0||l>0;if(h&&g){if(b>l){f=Math.round(d/j*o)}else{if(l>b){o=Math.round(j/d*f)}}}S.dimensions={height:o+e,width:f+a,innerHeight:o,innerWidth:f,top:Math.floor((m-(o+i))/2+k),left:Math.floor((n-(f+c))/2+k),oversized:g};return S.dimensions};S.makeGallery=function(e){var a=[],d=-1;if(typeof e=="string"){e=[e]}if(typeof e.length=="number"){each(e,function(g,h){if(h.content){a[g]=h}else{a[g]={content:h}}});d=0}else{if(e.tagName){var b=S.getCache(e);e=b?b:S.makeObject(e)}if(e.gallery){a=[];var f;for(var c in S.cache){f=S.cache[c];if(f.gallery&&f.gallery==e.gallery){if(d==-1&&f.content==e.content){d=a.length}a.push(f)}}if(d==-1){a.unshift(e);d=0}}else{a=[e];d=0}}each(a,function(g,h){a[g]=apply({},h)});return[a,d]};S.makeObject=function(d,c){var e={content:d.href,title:d.getAttribute("title")||"",link:d};if(c){c=apply({},c);each(["player","title","height","width","gallery"],function(f,g){if(typeof c[g]!="undefined"){e[g]=c[g];delete c[g]}});e.options=c}else{e.options={}}if(!e.player){e.player=S.getPlayer(e.content)}var a=d.getAttribute("rel");if(a){var b=a.match(galleryName);if(b){e.gallery=escape(b[2])}each(a.split(";"),function(f,g){b=g.match(inlineParam);if(b){e[b[1]]=b[2]}})}return e};S.getPlayer=function(c){if(c.indexOf("#")>-1&&c.indexOf(document.location.href)==0){return"inline"}var d=c.indexOf("?");if(d>-1){c=c.substring(0,d)}var b,a=c.match(fileExtension);if(a){b=a[0].toLowerCase()}if(b){if(S.img&&S.img.ext.indexOf(b)>-1){return"img"}if(S.swf&&S.swf.ext.indexOf(b)>-1){return"swf"}if(S.flv&&S.flv.ext.indexOf(b)>-1){return"flv"}if(S.qt&&S.qt.ext.indexOf(b)>-1){if(S.wmp&&S.wmp.ext.indexOf(b)>-1){return"qtwmp"}else{return"qt"}}if(S.wmp&&S.wmp.ext.indexOf(b)>-1){return"wmp"}}return"iframe"};function filterGallery(){var d=S.errorInfo,e=S.plugins,g,h,l,c,k,b,j,a;for(var f=0;f'+sprintf(S.lang.errors[k],b)+""}else{h=true}}else{if(g.player=="inline"){c=inlineId.exec(g.content);if(c){j=get(c[1]);if(j){g.content=j.innerHTML}else{h=true}}else{h=true}}else{if(g.player=="swf"||g.player=="flv"){a=g.options&&g.options.flashVersion||S.options.flashVersion;if(S.flash&&!S.flash.hasFlashPlayerVersion(a)){g.width=310;g.height=177}}}}if(h){S.gallery.splice(f,1);if(f0?f-1:f}}--f}}}function listenKeys(a){if(!S.options.enableKeys){return}(a?addEvent:removeEvent)(document,"keydown",handleKey)}function handleKey(c){if(c.metaKey||c.shiftKey||c.altKey||c.ctrlKey){return}var b=keyCode(c),a;switch(b){case 81:case 88:case 27:a=S.close;break;case 37:a=S.previous;break;case 39:a=S.next;break;case 32:a=typeof slideTimer=="number"?S.pause:S.play;break}if(a){preventDefault(c);a()}}function load(i){listenKeys(false);var h=S.getCurrent();var e=h.player=="inline"?"html":h.player;if(typeof S[e]!="function"){throw"unknown player "+e}if(i){S.player.remove();S.revertOptions();S.applyOptions(h.options||{})}S.player=new S[e](h,S.playerId);if(S.gallery.length>1){var f=S.gallery[S.current+1]||S.gallery[0];if(f.player=="img"){var d=new Image;d.src=f.content}var g=S.gallery[S.current-1]||S.gallery[S.gallery.length-1];if(g.player=="img"){var c=new Image;c.src=g.content}}S.skin.onLoad(i,waitReady)}function waitReady(){if(!open){return}if(typeof S.player.ready!="undefined"){var a=setInterval(function(){if(open){if(S.player.ready){clearInterval(a);a=null;S.skin.onReady(show)}}else{clearInterval(a);a=null}},10)}else{S.skin.onReady(show)}}function show(){if(!open){return}S.player.append(S.skin.body,S.dimensions);S.skin.onShow(finish)}function finish(){if(!open){return}if(S.player.onLoad){S.player.onLoad()}S.options.onFinish(S.getCurrent());if(!S.isPaused()){S.play()}listenKeys(true)}if(!Array.prototype.indexOf){Array.prototype.indexOf=function(b,c){var a=this.length>>>0;c=c||0;if(c<0){c+=a}for(;c-1;S.plugins={fla:names.indexOf("Shockwave Flash")>-1,qt:names.indexOf("QuickTime")>-1,wmp:!f4m&&names.indexOf("Windows Media")>-1,f4m:f4m}}else{var detectPlugin=function(a){var b;try{b=new ActiveXObject(a)}catch(c){}return!!b};S.plugins={fla:detectPlugin("ShockwaveFlash.ShockwaveFlash"),qt:detectPlugin("QuickTime.QuickTime"),wmp:detectPlugin("wmplayer.ocx"),f4m:false}}var relAttr=/^(light|shadow)box/i,expando="shadowboxCacheKey",cacheKey=1;S.cache={};S.select=function(b){var c=[];if(!b){var a;each(document.getElementsByTagName("a"),function(f,g){a=g.getAttribute("rel");if(a&&relAttr.test(a)){c.push(g)}})}else{var e=b.length;if(e){if(typeof b=="string"){if(S.find){c=S.find(b)}}else{if(e==2&&typeof b[0]=="string"&&b[1].nodeType){if(S.find){c=S.find(b[0],b[1])}}else{for(var d=0;d<\/script>");script=getElementById("__ie_ondomload");if(script){addListener(script,"onreadystatechange",checkReadyState)}}catch(e){}}if(ua.webkit&&typeof doc.readyState!=UNDEF){timer=setInterval(function(){if(/loaded|complete/.test(doc.readyState)){callDomLoadFunctions()}},10)}if(typeof doc.addEventListener!=UNDEF){doc.addEventListener("DOMContentLoaded",callDomLoadFunctions,null)}addLoadEvent(callDomLoadFunctions)}();function checkReadyState(){if(script.readyState=="complete"){script.parentNode.removeChild(script);callDomLoadFunctions()}}function callDomLoadFunctions(){if(isDomLoaded){return}if(ua.ie&&ua.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 dl=domLoadFnArr.length;for(var i=0;i0){var obj=getElementById(id);if(obj){regObjArr[i].width=obj.getAttribute("width")?obj.getAttribute("width"):"0";regObjArr[i].height=obj.getAttribute("height")?obj.getAttribute("height"):"0";if(hasPlayerVersion(regObjArr[i].swfVersion)){if(ua.webkit&&ua.webkit<312){fixParams(obj)}setVisibility(id,true)}else{if(regObjArr[i].expressInstall&&!isExpressInstallActive&&hasPlayerVersion("6.0.65")&&(ua.win||ua.mac)){showExpressInstall(regObjArr[i])}else{displayAltContent(obj)}}}}else{setVisibility(id,true)}}}function fixParams(obj){var nestedObj=obj.getElementsByTagName(OBJECT)[0];if(nestedObj){var e=createElement("embed"),a=nestedObj.attributes;if(a){var al=a.length;for(var i=0;i'}}el.outerHTML='"+par+"";objIdArr[objIdArr.length]=attObj.id;r=getElementById(attObj.id)}else{if(ua.webkit&&ua.webkit<312){var e=createElement("embed");e.setAttribute("type",FLASH_MIME_TYPE);for(var k in attObj){if(attObj[k]!=Object.prototype[k]){if(k.toLowerCase()=="data"){e.setAttribute("src",attObj[k])}else{if(k.toLowerCase()=="styleclass"){e.setAttribute("class",attObj[k])}else{if(k.toLowerCase()!="classid"){e.setAttribute(k,attObj[k])}}}}}for(var l in parObj){if(parObj[l]!=Object.prototype[l]){if(l.toLowerCase()!="movie"){e.setAttribute(l,parObj[l])}}}el.parentNode.replaceChild(e,el);r=e}else{var o=createElement(OBJECT);o.setAttribute("type",FLASH_MIME_TYPE);for(var m in attObj){if(attObj[m]!=Object.prototype[m]){if(m.toLowerCase()=="styleclass"){o.setAttribute("class",attObj[m])}else{if(m.toLowerCase()!="classid"){o.setAttribute(m,attObj[m])}}}}for(var n in parObj){if(parObj[n]!=Object.prototype[n]&&n.toLowerCase()!="movie"){createObjParam(o,n,parObj[n])}}el.parentNode.replaceChild(o,el);r=o}}}return r}function createObjParam(el,pName,pValue){var p=createElement("param");p.setAttribute("name",pName);p.setAttribute("value",pValue);el.appendChild(p)}function removeSWF(id){var obj=getElementById(id);if(obj&&(obj.nodeName=="OBJECT"||obj.nodeName=="EMBED")){if(ua.ie&&ua.win){if(obj.readyState==4){removeObjectInIE(id)}else{win.attachEvent("onload",function(){removeObjectInIE(id)})}}else{obj.parentNode.removeChild(obj)}}}function removeObjectInIE(id){var obj=getElementById(id);if(obj){for(var i in obj){if(typeof obj[i]=="function"){obj[i]=null}}obj.parentNode.removeChild(obj)}}function getElementById(id){var el=null;try{el=doc.getElementById(id)}catch(e){}return el}function createElement(el){return doc.createElement(el)}function addListener(target,eventType,fn){target.attachEvent(eventType,fn);listenersArr[listenersArr.length]=[target,eventType,fn]}function hasPlayerVersion(rv){var pv=ua.pv,v=rv.split(".");v[0]=parseInt(v[0],10);v[1]=parseInt(v[1],10)||0;v[2]=parseInt(v[2],10)||0;return pv[0]>v[0]||pv[0]==v[0]&&pv[1]>v[1]||pv[0]==v[0]&&pv[1]==v[1]&&pv[2]>=v[2]?true:false}function createCSS(sel,decl){if(ua.ie&&ua.mac){return}var h=doc.getElementsByTagName("head")[0],s=createElement("style");s.setAttribute("type","text/css");s.setAttribute("media","screen");if(!(ua.ie&&ua.win)&&typeof doc.createTextNode!=UNDEF){s.appendChild(doc.createTextNode(sel+" {"+decl+"}"))}h.appendChild(s);if(ua.ie&&ua.win&&typeof doc.styleSheets!=UNDEF&&doc.styleSheets.length>0){var ls=doc.styleSheets[doc.styleSheets.length-1];if(typeof ls.addRule==OBJECT){ls.addRule(sel,decl)}}}function setVisibility(id,isVisible){var v=isVisible?"visible":"hidden";if(isDomLoaded&&getElementById(id)){getElementById(id).style.visibility=v}else{createCSS("#"+id,"visibility:"+v)}}function urlEncodeIfNecessary(s){var regex=/[\\\"<>\.;]/;var hasBadChars=regex.exec(s)!=null;return hasBadChars?encodeURIComponent(s):s}var cleanup=function(){if(ua.ie&&ua.win){window.attachEvent("onunload",function(){var ll=listenersArr.length;for(var i=0;i{1}, чтобы просмотривать этот контент.',shared:'Чтобы просмотреть этот контент, вы должны установить и {1}, и {3}.',either:'Вы должны установить или {1} плагин, или {3}, чтобы просмотреть этот контент.'}};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.iframe=function(b,c){this.obj=b;this.id=c;var a=get("sb-overlay");this.height=b.height?parseInt(b.height,10):a.offsetHeight;this.width=b.width?parseInt(b.width,10):a.offsetWidth};S.iframe.prototype={append:function(a,c){var b='