if(window.location.pathname.length>2){uri=window.location.pathname.substring(1);uri="http://"+window.location.hostname+"/#!"+uri.replace(/\//g,":");location.replace(uri);}var welcomeVideo="welcome.flv";var playerPath="/js/Player-1.0.3.swf";var videoFolder="/media/ru/videos/";var ajaxLoader='<img src="/img/front-end/ajax-loader.gif" alt="Загрузка..." />';var playerId="sm-player";var player=null;var context="main";function initPlayer(c){var a={file:videoFolder+c,autostart:"true",stretching:"fill",controlbar:"over",bufferlenght:3,skin:"/js/beelden.zip",as_wordmode:"true"};if(c==welcomeVideo){a.image="/media/ru/videos/welcome-video-preview.jpg";a.autostart="false";a.as_wordmode="false";}var d={allowfullscreen:"true",allowscriptaccess:"always",wmode:"opaque"};var b={id:playerId,name:playerId};swfobject.embedSWF(playerPath,"video-player","450","353","10.0.0",false,a,d,b);}function playerReady(a){player=window.document[a.id];if(context=="word"||context=="themes"){player.sendEvent("PLAY","true");}}function makeUriFromHash(a){a=a.substring(1);return a.replace(/:/g,"/");}function getPathFromWholeLink(a){var b="^(([^:/\\?#]+):)?(//(([^:/\\?#]*)(?::([^/\\?#]*))?))?([^\\?#]*)(\\?([^#]*))?(#(.*))?$";var d=new RegExp(b);var c=d.exec(a);return c[7];}$(document).ready(function(){var d=$("#left-list-inner");var j=$("#ajaxContent");var l=$("#left-list-inner-themes");var t=$("#left-list-inner-by-letter");var p=$("#left-list-inner-themes-category");var r=$("#left-list-inner-themes-display");var q=$("#left-list-inner-themes-word");var e=null;initPlayer(welcomeVideo);$("#header-left h1, #main-page-link").live("click",function(){n("main");$("#left-tabs-letter").fadeOut();$("#header-dictionary a").removeClass("active-bold");e=null;q.text("");m();o();u();return false;});$("#header-dictionary table tbody tr td a").click(function(){n("surdo","letter",encodeURI($(this).text()));$("#header-dictionary a").removeClass("active-bold");$(this).addClass("active-bold");return false;});$("#left-list-words a, #left-list-inner-themes-word a, .words-in-theme a").live("click",function(){var y=getPathFromWholeLink($(this).attr("href"));y=y.split("/");n("surdo","word",y[3]);e=y[3];b();return false;});$(".words-in-theme a").live("click",function(){c();return false;});$("#left-return-to-themes").live("click",function(){o();return false;});$("#left-list-inner-themes-category a, a.theme-in-breadcumb").live("click",function(){var y=getPathFromWholeLink($(this).attr("href"));y=y.split("/");n("surdo","category",y[3]);m(y[3]);return false;});$("a.theme-in-breadcumb").live("click",function(){o();u();return false;});$("#search-input").focus(function(){if($(this).hasClass("search-input-inactive")){$(this).val("");$(this).removeClass("search-input-inactive");}}).blur(function(){if($(this).val()==""){$(this).addClass("search-input-inactive");$(this).val("Поиск");}}).liveSearch({url:"/search/live-search/"});$("a.surdo-word-link").live("click",function(){var y=getPathFromWholeLink($(this).attr("href"));y=y.split("/");n("surdo","word",y[3]);return false;});$("#search-button").click(function(){n("search","full-search",encodeURI($("#search-input").val()));return false;});$("#search-form").submit(function(){n("search","full-search",encodeURI($("#search-input").val()));$("#jquery-live-search").slideUp();return false;});function s(){l.addClass("left-list-inner-inactive");$("#left-tabs-letter").addClass("left-tabs-active");$("#left-tabs-themes").removeClass();t.removeClass();$("#left-tabs-letter").fadeIn(200,function(){b();});}function u(){t.addClass("left-list-inner-inactive");$("#left-tabs-themes").addClass("left-tabs-active");$("#left-tabs-letter").removeClass();l.removeClass();b();}function o(){r.hide();p.fadeIn(200);}function c(){p.hide();r.fadeIn(200,function(){b();});}function b(){$("#left-list-words a").removeClass("active");$("#left-list-inner-themes-word a").removeClass("active");if(e){var y=null;var A=null;var z=0;if($("#left-tabs-letter").hasClass("left-tabs-active")){y=$("#left-list-inner-by-letter a[href$='/"+e+"']");A=$("#left-list-inner-by-letter");if(y.length==1){y.addClass("active");z=A.scrollTop()-(A.height()/2-(y.position().top-A.offset().top));A.animate({scrollTop:z},700);}else{if(A.length==1){A.animate({scrollTop:0},700);}}}else{if($("#left-tabs-themes").hasClass("left-tabs-active")){y=$("#left-list-inner-themes-word a[href$='/"+e+"']");if(y.length==1){y.addClass("active");A=$("#left-list-inner-themes-word");z=A.scrollTop()-(A.height()/2-(y.position().top-A.offset().top));A.animate({scrollTop:z},700);}}}}}function m(y){$("#left-list-words a").removeClass("active");$("#left-list-inner-themes-word span a").removeClass("active");$("#left-list-inner-themes-category a").removeClass("active");if(y){$("#left-list-inner-themes-category a[href$='/"+y+"']").addClass("active");}}$("#left-tabs-letter").click(function(){s();return false;});$("#left-tabs-themes").click(function(){u();return false;});$(".dactyl-link").live("click",function(){uri=$(this).attr("href");
uri=uri.split("/");n("dactyl",uri[2]);return false;});$("a.pages-link").live("click",function(){uri=$(this).attr("href");uri=uri.split("/");n("pages",uri[2]);return false;});$("a.news-link").live("click",function(){var y=getPathFromWholeLink($(this).attr("href"));y=y.split("/");n("news",y[2],y[3],y[4]);return false;});function n(y,B,A,z){uri="!"+y;uri+=B?":"+B:"";uri+=A?":"+A:"";uri+=z?":"+z:"";$.History.setHash(uri);}$.History.bind(function(A){hash=A.substring(1);hash=hash.split(":");var y=hash.length;if(y>0){switch(hash[0]){case"main":a(A);case"surdo":if(y>1){switch(hash[1]){case"letter":k(A);break;case"category":g(A);if(y>2){v("surdo/wordofcategory/"+hash[2]);}break;case"word":w(A);break;}}break;case"dactyl":i(A);break;case"pages":f(A);break;case"search":x(A);break;case"news":h(A);break;}}var z="/"+A.replace(/:/g,"/");z=z.replace("!","");_gaq.push(["_trackPageview",z]);});function k(y){hash=y.substring(1);hash=hash.split(":");hash[2]=decodeURI(hash[2]);$("#left-tabs-letter span").text(hash[2]);t.html(ajaxLoader);y=encodeURI(y);$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){t.html(z);},complete:function(){s();document.title='Сурдосервер 2.0 → Сурдо → Слова на букву "'+hash[2]+'"';}});}function w(y){if(context!="word"){context="word";}j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){initPlayer($("#word-video-url").text());document.title='Сурдосервер 2.0 → Сурдо → Слово "'+$("#word-header div").text()+'"';clipExplanationBlock();}});}function g(y){if(context!="themes"){context="themes";}j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){document.title='Сурдосервер 2.0 → Сурдо → Категория "'+$("#content-header h2 div").text()+'"';}});}function v(y){y=encodeURI(y);$.ajax({url:y,type:"GET",success:function(z){q.html(z);},complete:function(){}});}function a(y){if(context!="main"){context="main";j.html("");j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:"/index",type:"GET",success:function(z){j.html(z);},complete:function(){initPlayer(welcomeVideo);document.title="Сурдосервер 2.0";}});}}function i(y){if(context!="dactyl"){context="dactyl";}$("html, body").animate({scrollTop:j.offset().top},500);j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){$("#dact-title").text()==""?document.title="Сурдосервер 2.0 → Дактильные азбуки мира":document.title='Сурдосервер 2.0 → Дактильная азбука "'+$("#dact-title").text()+'"';}});}function f(y){if(context!="page"){context="page";}$("html, body").animate({scrollTop:j.offset().top},500);j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){document.title="Сурдосервер 2.0 → "+$("#page-title").text();}});}function x(y){if(context!="search"){context="search";}$("html, body").animate({scrollTop:j.offset().top},500);j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){document.title="Сурдосервер 2.0 → Поиск";}});}function h(y){if(context!="news"){context="news";}$("html, body").animate({scrollTop:j.offset().top},500);j.html('<div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div>");$.ajax({url:makeUriFromHash(y),type:"GET",success:function(z){j.html(z);},complete:function(){document.title="Сурдосервер 2.0 → Новости";}});}});var modalOptions={overlayClose:true,onOpen:function(a){a.overlay.fadeIn("fast",function(){a.container.slideDown("fast",function(){a.data.fadeIn("fast");});});},onClose:function(a){a.data.fadeOut("fast",function(){a.container.slideUp("fast",function(){a.overlay.fadeOut("fast",function(){$.modal.close();});});});}};$(document).ready(function(){$("a#pages-feedback-link").live("click",function(){modalContent='<div id="feedback-content"><div style="text-align:center; padding-top:100px">'+ajaxLoader+"</div></div>";$.modal(modalContent,modalOptions);$.ajax({url:$(this).attr("href"),type:"GET",success:function(a){$("#feedback-content").html(a);}});return false;});$("#left-list-inner").css("overflow","visible");$("#left-list-inner-themes ul:first").make2lvlMenu();$("#openExplanationLink").live("click",function(){$("#word-explanation").html($("#word-explanation").data("fullText"));$("#word-explanation").append(closeExplanationLink);return false;});$("#closeExplanationLink").live("click",function(){$("#word-explanation").html($("#word-explanation").data("cuttedText")+" ...");
$("#word-explanation").append(openExplanationLink);return false;});});var openExplanationLink='<a href="#" id="openExplanationLink" style="display: block" title="Открыть весь текст пояснения">Всё пояснение &rarr;</a>';var closeExplanationLink='<a href="#" id="closeExplanationLink" style="display: block" title="Свернуть текст пояснения">Свернуть пояснение &uarr;</a>';function clipExplanationBlock(){var e=$("#word-explanation");var a=14;var d=a*parseInt(e.css("line-height"));if(e.height()>d){e.data("fullHeight",e.height());var b=Math.round(e.width()/9)*a;e.data("fullText",e.html());var c=String(e.html()).substring(0,b);c=c.substring(0,c.lastIndexOf(" "));e.data("cuttedText",c);e.html(c+" &hellip;<br />"+openExplanationLink);}}(function(a){if(typeof console==="undefined"){console=typeof window.console!=="undefined"?window.console:{};}console.log=console.log||function(){};console.debug=console.debug||console.log;console.warn=console.warn||console.log;console.error=console.error||function(){for(var d=[],c=0;c<arguments.length;c++){d.push(arguments[c]);}alert(d.join("\n"));};console.trace=console.trace||console.log;console.group=console.group||console.log;console.groupEnd=console.groupEnd||console.log;console.profile=console.profile||console.log;console.profileEnd=console.profileEnd||console.log;a.History={options:{debug:false},state:"",$window:null,$iframe:null,handlers:{generic:[],specific:{}},format:function(b){return b=b.replace(/^.+?#/g,"").replace(/^#?\/?|\/?$/g,"");},getState:function(){return a.History.state;},setState:function(d){var c=a.History;d=c.format(d);c.state=d;return c.state;},getHash:function(){var b=window.location.hash||location.hash;return b=a.History.format(b);},setHash:function(b){b=a.History.format(b);if(typeof window.location.hash!=="undefined"){window.location.hash=b;}else{location.hash=b;}if(a.browser.msie&&parseInt(a.browser.version,10)<8){a.History.$iframe.contentWindow.document.open();a.History.$iframe.contentWindow.document.close();a.History.$iframe.contentWindow.document.location.hash=b;}},go:function(d){var c=a.History;d=c.format(d);if(c.getHash()!==d){c.setHash(d);}else{c.setState(d);c.trigger();}return true;},hashchange:function(){var e=a.History;e.options.debug&&console.debug("History.hashchange",this,arguments);var c=e.getHash(),f=e.getState();if(!e.$iframe&&f===c||e.$iframe&&e.hash===e.$iframe.contentWindow.document.location.hash){return false;}if(f===c){return false;}e.setState(c);e.trigger();return true;},bind:function(e,c){var f=a.History;if(c){if(typeof f.handlers.specific[e]==="undefined"){f.handlers.specific[e]=[];}f.handlers.specific[e].push(c);}else{c=e;f.handlers.generic.push(c);}return true;},trigger:function(h){var c=a.History;if(typeof h==="undefined"){h=c.getState();}var l,j,i,k;if(typeof c.handlers.specific[h]!=="undefined"){k=c.handlers.specific[h];l=0;for(j=k.length;l<j;++l){i=k[l];i(h);}}k=c.handlers.generic;l=0;for(j=k.length;l<j;++l){i=k[l];i(h);}return true;},construct:function(){var b=a.History;a(document).ready(function(){b.domReady();});return true;},configure:function(d){var c=a.History;c.options=a.extend(c.options,d);return true;},domReadied:false,domReady:function(){var b=a.History;if(!b.domRedied){b.domRedied=true;b.$window=a(window);b.$window.bind("hashchange",this.hashchange);setTimeout(b.hashchangeLoader,200);return true;}},hashchangeLoader:function(){var d=a.History;if(a.browser.msie&&parseInt(a.browser.version)>=8){(c=d.getHash())&&d.$window.trigger("hashchange");}else{if(a.browser.msie){d.$iframe=a('<iframe id="jquery-history-iframe" style="display: none;"></$iframe>').prependTo(document.body)[0];d.$iframe.contentWindow.document.open();d.$iframe.contentWindow.document.close();var c=d.getHash();if(c){d.$iframe.contentWindow.document.location.hash=c;}c=function(){var b=d.format(d.$iframe.contentWindow.document.location.hash);d.getState()!==b&&d.setHash(d.$iframe.contentWindow.document.location.hash);b=d.getHash();d.getState()!==b&&d.go(b);};}else{c=function(){var b=d.getHash();d.getState()!==b&&d.go(b);};}setInterval(c,200);}return true;}};a.History.construct();})(jQuery);jQuery.fn.liveSearch=function(b){var a=jQuery.extend({url:"/search/live-search/",id:"jquery-live-search",duration:300,typeDelay:200,loadingClass:"livesearch-loading",onSlideUp:function(){},uptadePosition:false},b);var c=jQuery("#"+a.id);if(!c.length){c=jQuery('<div id="'+a.id+'"></div>').appendTo(document.body).hide().slideUp(0);jQuery(document.body).click(function(e){var d=jQuery(e.target);if(!(d.is("#"+a.id)||d.parents("#"+a.id).length||d.is("input"))){c.slideUp(a.duration,function(){a.onSlideUp();});}});}return this.each(function(){var d=jQuery(this).attr("autocomplete","off");var g=parseInt(c.css("paddingLeft"),10)+parseInt(c.css("paddingRight"),10)+parseInt(c.css("borderLeftWidth"),10)+parseInt(c.css("borderRightWidth"),10);var f=function(){var j=d.offset();var i={left:j.left,top:j.top,width:d.outerWidth(),height:d.outerHeight()};
i.topPos=i.top+i.height;c.width()==null?i.totalWidth=i.width-g:i.totalWidth=c.width();c.css({position:"absolute",left:i.left+"px",top:i.topPos+"px",width:i.totalWidth+"px"});};var e=function(){f();$(window).unbind("resize",f);$(window).bind("resize",f);c.slideDown(a.duration);};var h=function(){c.slideUp(a.duration,function(){a.onSlideUp();});};d.focus(function(){if(this.value!==""){if(c.html()==""){this.lastValue="";d.keyup();}else{setTimeout(e,1);}}}).keyup(function(){if(this.value!=this.lastValue){d.addClass(a.loadingClass);var i=String(this.value);i=i.replace(/(^\s+)|(\s+$)/g,"");i=encodeURI(i);if(this.timer){clearTimeout(this.timer);}if(i){this.timer=setTimeout(function(){jQuery.get(a.url+i,function(k){var j=a.url+decodeURI(i);j=j.replace(/:/g,"/");j=j.replace("!","");_gaq.push(["_trackPageview",j]);d.removeClass(a.loadingClass);if(k.length&&i.length){c.html(k);e();}else{h();}});},a.typeDelay);}else{d.removeClass(a.loadingClass);h();}this.lastValue=this.value;}});});};(function(a){a.fn.make2lvlMenu=function(c){var b={openArrow:"&rarr;"};if(c){a.extend(b,c);}a(this).attr("id","jq-menu");var d=a(this).find("ul").parent();d.each(function(){var e=a(this);e.find("a:first").after(" "+b.openArrow);e.find("ul").hide().addClass("jq-sub-menu border-radius-all");e.find("ul").data("flag",0);e.bind("mouseenter",function(){$ul=a(this).find("ul:first");if($ul.data("flag")==0){$ul.data("flag",1).fadeIn(100);}else{$ul.stop(true,true).fadeIn(100);}}).bind("mouseleave",function(){$ul=a(this).find("ul:first");$ul.fadeOut(100,function(){$ul.data("flag",0);});});});return this;};})(jQuery);(function(c){var b=c.browser.msie&&parseInt(c.browser.version)==6&&typeof window["XMLHttpRequest"]!="object",d=null,a=[];c.modal=function(f,e){return c.modal.impl.init(f,e);};c.modal.close=function(){c.modal.impl.close();};c.fn.modal=function(e){return c.modal.impl.init(this,e);};c.modal.defaults={appendTo:"body",focus:true,opacity:50,overlayId:"simplemodal-overlay",overlayCss:{},containerId:"simplemodal-container",containerCss:{},dataId:"simplemodal-data",dataCss:{},minHeight:200,minWidth:300,maxHeight:null,maxWidth:null,autoResize:false,autoPosition:true,zIndex:1000,close:true,closeHTML:'<a class="modalCloseImg" title="Close"></a>',closeClass:"simplemodal-close",escClose:true,overlayClose:false,position:null,persist:false,onOpen:null,onShow:null,onClose:null};c.modal.impl={o:null,d:{},init:function(g,e){var f=this;if(f.d.data){return false;}d=c.browser.msie&&!c.boxModel;f.o=c.extend({},c.modal.defaults,e);f.zIndex=f.o.zIndex;f.occb=false;if(typeof g=="object"){g=g instanceof jQuery?g:c(g);if(g.parent().parent().size()>0){f.d.parentNode=g.parent();if(!f.o.persist){f.d.orig=g.clone(true);}}}else{if(typeof g=="string"||typeof g=="number"){g=c("<div></div>").html(g);}else{alert("SimpleModal Error: Unsupported data type: "+typeof g);return f;}}f.create(g);g=null;f.open();if(c.isFunction(f.o.onShow)){f.o.onShow.apply(f,[f.d]);}return f;},create:function(f){var e=this;a=e.getDimensions();if(b){e.d.iframe=c('<iframe src="javascript:false;"></iframe>').css(c.extend(e.o.iframeCss,{display:"none",opacity:0,position:"fixed",height:a[0],width:a[1],zIndex:e.o.zIndex,top:0,left:0})).appendTo(e.o.appendTo);}e.d.overlay=c("<div></div>").attr("id",e.o.overlayId).addClass("simplemodal-overlay").css(c.extend(e.o.overlayCss,{display:"none",opacity:e.o.opacity/100,height:a[0],width:a[1],position:"fixed",left:0,top:0,zIndex:e.o.zIndex+1})).appendTo(e.o.appendTo);e.d.container=c("<div></div>").attr("id",e.o.containerId).addClass("simplemodal-container").css(c.extend(e.o.containerCss,{display:"none",position:"fixed",zIndex:e.o.zIndex+2})).append(e.o.close&&e.o.closeHTML?c(e.o.closeHTML).addClass(e.o.closeClass):"").appendTo(e.o.appendTo);e.d.wrap=c("<div></div>").attr("tabIndex",-1).addClass("simplemodal-wrap").css({height:"100%",outline:0,width:"100%"}).appendTo(e.d.container);e.d.data=f.attr("id",f.attr("id")||e.o.dataId).addClass("simplemodal-data").css(c.extend(e.o.dataCss,{display:"none"})).appendTo("body");f=null;e.setContainerDimensions();e.d.data.appendTo(e.d.wrap);if(b||d){e.fixIE();}},bindEvents:function(){var e=this;c("."+e.o.closeClass).bind("click.simplemodal",function(f){f.preventDefault();e.close();});if(e.o.close&&e.o.overlayClose){e.d.overlay.bind("click.simplemodal",function(f){f.preventDefault();e.close();});}c(document).bind("keydown.simplemodal",function(f){if(e.o.focus&&f.keyCode==9){e.watchTab(f);}else{if((e.o.close&&e.o.escClose)&&f.keyCode==27){f.preventDefault();e.close();}}});c(window).bind("resize.simplemodal",function(){a=e.getDimensions();e.setContainerDimensions(true);if(b||d){e.fixIE();}else{e.d.iframe&&e.d.iframe.css({height:a[0],width:a[1]});e.d.overlay.css({height:a[0],width:a[1]});}});},unbindEvents:function(){c("."+this.o.closeClass).unbind("click.simplemodal");c(document).unbind("keydown.simplemodal");c(window).unbind("resize.simplemodal");this.d.overlay.unbind("click.simplemodal");},fixIE:function(){var e=this,f=e.o.position;
c.each([e.d.iframe||null,e.d.overlay,e.d.container],function(r,k){if(k){var p="document.body.clientHeight",u="document.body.clientWidth",w="document.body.scrollHeight",t="document.body.scrollLeft",n="document.body.scrollTop",j="document.body.scrollWidth",h="document.documentElement.clientHeight",q="document.documentElement.clientWidth",o="document.documentElement.scrollLeft",x="document.documentElement.scrollTop",y=k[0].style;y.position="absolute";if(r<2){y.removeExpression("height");y.removeExpression("width");y.setExpression("height",""+w+" > "+p+" ? "+w+" : "+p+' + "px"');y.setExpression("width",""+j+" > "+u+" ? "+j+" : "+u+' + "px"');}else{var m,g;if(f&&f.constructor==Array){var v=f[0]?typeof f[0]=="number"?f[0].toString():f[0].replace(/px/,""):k.css("top").replace(/px/,"");m=v.indexOf("%")==-1?v+" + (t = "+x+" ? "+x+" : "+n+') + "px"':parseInt(v.replace(/%/,""))+" * (("+h+" || "+p+") / 100) + (t = "+x+" ? "+x+" : "+n+') + "px"';if(f[1]){var l=typeof f[1]=="number"?f[1].toString():f[1].replace(/px/,"");g=l.indexOf("%")==-1?l+" + (t = "+o+" ? "+o+" : "+t+') + "px"':parseInt(l.replace(/%/,""))+" * (("+q+" || "+u+") / 100) + (t = "+o+" ? "+o+" : "+t+') + "px"';}}else{m="("+h+" || "+p+") / 2 - (this.offsetHeight / 2) + (t = "+x+" ? "+x+" : "+n+') + "px"';g="("+q+" || "+u+") / 2 - (this.offsetWidth / 2) + (t = "+o+" ? "+o+" : "+t+') + "px"';}y.removeExpression("top");y.removeExpression("left");y.setExpression("top",m);y.setExpression("left",g);}}});},focus:function(h){var f=this,g=h||"first";var e=c(":input:enabled:visible:"+g,f.d.wrap);e.length>0?e.focus():f.d.wrap.focus();},getDimensions:function(){var f=c(window);var e=c.browser.opera&&c.browser.version>"9.5"&&c.fn.jquery<="1.2.6"?document.documentElement["clientHeight"]:c.browser.opera&&c.browser.version<"9.5"&&c.fn.jquery>"1.2.6"?window.innerHeight:f.height();return[e,f.width()];},getVal:function(e){return e=="auto"?0:e.indexOf("%")>0?e:parseInt(e.replace(/px/,""));},setContainerDimensions:function(h){var j=this;if(!h||(h&&j.o.autoResize)){var i=j.getVal(j.d.container.css("height")),e=j.getVal(j.d.container.css("width")),k=j.d.data.outerHeight(true),g=j.d.data.outerWidth(true);var f=j.o.maxHeight&&j.o.maxHeight<a[0]?j.o.maxHeight:a[0],l=j.o.maxWidth&&j.o.maxWidth<a[1]?j.o.maxWidth:a[1];if(!i){if(!k){i=j.o.minHeight;}else{if(k>f){i=f;}else{if(k<j.o.minHeight){i=j.o.minHeight;}else{i=k;}}}}else{i=i>f?f:i;}if(!e){if(!g){e=j.o.minWidth;}else{if(g>l){e=l;}else{if(g<j.o.minWidth){e=j.o.minWidth;}else{e=g;}}}}else{e=e>l?l:e;}j.d.container.css({height:i,width:e});if(k>i||g>e){j.d.wrap.css({overflow:"auto"});}}if(j.o.autoPosition){j.setPosition();}},setPosition:function(){var f=this,h,g,i=(a[0]/2)-(f.d.container.outerHeight(true)/2),e=(a[1]/2)-(f.d.container.outerWidth(true)/2);if(f.o.position&&Object.prototype.toString.call(f.o.position)==="[object Array]"){h=f.o.position[0]||i;g=f.o.position[1]||e;}else{h=i;g=e;}f.d.container.css({left:g,top:h});},watchTab:function(g){var f=this;if(c(g.target).parents(".simplemodal-container").length>0){f.inputs=c(":input:enabled:visible:first, :input:enabled:visible:last",f.d.data[0]);if((!g.shiftKey&&g.target==f.inputs[f.inputs.length-1])||(g.shiftKey&&g.target==f.inputs[0])||f.inputs.length==0){g.preventDefault();var h=g.shiftKey?"last":"first";setTimeout(function(){f.focus(h);},10);}}else{g.preventDefault();setTimeout(function(){f.focus();},10);}},open:function(){var e=this;e.d.iframe&&e.d.iframe.show();if(c.isFunction(e.o.onOpen)){e.o.onOpen.apply(e,[e.d]);}else{e.d.overlay.show();e.d.container.show();e.d.data.show();}e.focus();e.bindEvents();},close:function(){var e=this;if(!e.d.data){return false;}e.unbindEvents();if(c.isFunction(e.o.onClose)&&!e.occb){e.occb=true;e.o.onClose.apply(e,[e.d]);}else{if(e.d.parentNode){if(e.o.persist){e.d.data.hide().appendTo(e.d.parentNode);}else{e.d.data.hide().remove();e.d.orig.appendTo(e.d.parentNode);}}else{e.d.data.hide().remove();}e.d.container.hide().remove();e.d.overlay.hide().remove();e.d.iframe&&e.d.iframe.hide().remove();e.d={};}}};})(jQuery);var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0;}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7");}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always";}catch(t){if(AC[0]==6){AB=true;}}if(!AB){try{y=new ActiveXObject(p);
}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)];}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w};}();var L=function(){if(!h.w3cdom){return;}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S);}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E();}},10);}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null);}R(E);}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E();}}function E(){if(e){return;}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u);}catch(w){return;}}e=true;if(Z){clearInterval(Z);Z=null;}var q=o.length;for(var r=0;r<q;r++){o[r]();}}function f(q){if(e){q();}else{o[o.length]=q;}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false);}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false);}else{if(typeof j.attachEvent!=b){I(j,"onload",r);}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r();};}else{j.onload=r;}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r);}W(u,true);}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q]);}else{O(r);}}}}else{W(u,true);}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue);}else{w.setAttribute(y[u].nodeName,y[u].nodeValue);}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"));}}}t.parentNode.replaceChild(w,t);}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId;}}else{M=G(u);}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310";}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137";}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u);};I(j,"onload",v);}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x);}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t);};I(j,"onload",q);}else{t.parentNode.replaceChild(G(t),t);}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML;}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true));}}}}}return u;}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t;}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB];}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"';}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"';}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />';}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id);}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z]);}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z]);}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z]);}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y]);}}}v.parentNode.replaceChild(AC,v);q=AC;}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x]);}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x]);}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w]);
}}v.parentNode.replaceChild(u,v);q=u;}}}return q;}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u);}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r);}else{j.attachEvent("onload",function(){B(r);});}}else{q.parentNode.removeChild(q);}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null;}}r.parentNode.removeChild(r);}}function C(t){var q=null;try{q=K.getElementById(t);}catch(r){}return q;}function a(q){return K.createElement(q);}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r];}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false;}function V(v,r){if(h.ie&&h.mac){return;}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"));}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r);}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r;}else{V("#"+t,"visibility:"+r);}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s;}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2]);}var t=i.length;for(var u=0;u<t;u++){X(i[u]);}for(var r in h){h[r]=null;}h=null;for(var q in swfobject){swfobject[q]=null;}swfobject=null;});}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return;}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false);},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t;}else{if(typeof u.SetVariable!=b){q=u;}}}}return q;},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return;}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v];}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u];}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t];}else{y.flashvars=t+"="+r[t];}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true);}});}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF);});}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]};},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q);}else{return undefined;}},removeSWF:function(q){if(h.w3cdom){X(q);}},createCSS:function(r,q){if(h.w3cdom){V(r,q);}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u);}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)));}}}return"";},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block";}}M=null;l=null;A=false;}}}};}();
