var defVars=$.extend({LANGUAGE_ID:"ru"},defVars||{});String.prototype.replaceAll=function(b,a){return this.replace(new RegExp(b,"g"),a)};var arImages=[];var jsImage={preload:function(b,a){if(typeof(a)!="string"){a=""}$.each(b,function(){img=new Image;img.src=a+this;arImages.push(img)})},change:function(b,a){b=$(b);if(!b||!b.src){return false}if(typeof(a)!="string"){a=""}b.src=a}};var jsGoToTop={settings:{go_to_top_id:"gototop",top_id:"top",go_to_top_text:"Top"},start:function(a){this.settings=$.extend(this.settings,a);this.go_to_top=$(this.settings.go_to_top_id);if(!this.go_to_top.length){this._create()}this.top=$(this.settings.top_id);if(!this.top.length){this._createTop()}this.go_to_top.css("opacity","0.5").css("display","block");this.go_to_top.scrollGoTo({min:50,speed:200});$(this.go_to_top).click(function(b){b.preventDefault();$.scrollTo(0,300,{queue:true})}).hover(function(){$(this).css("opacity","0.85")},function(){$(this).css("opacity","0.5")})},_create:function(){this.go_to_top=$("<a/>").attr({id:this.settings.go_to_top_id,"class":"go-up no-print",href:"#"+this.settings.top_id}).css({"-moz-background-inline-policy":"continuous","-moz-background-clip":"border","-moz-background-origin":"padding","-moz-border-radius":"10px","-webkit-border-radius":"10px","border-radius":"10px",display:"block","background-color":"#003366","z-index":500,position:"fixed",right:"5px",bottom:"5px",color:"#CCC",width:"65px","font-weight":"bold","font-family":"tahoma","font-size":"11px",padding:"7px 7px 7px 17px","text-decoration":"none"}).text(this.settings.go_to_top_text).appendTo($(document.body))},_createTop:function(){this.top=$("<a/>").attr("id",this.settings.top_id).attr({name:""+this.settings.top_id}).prependTo($(document.body))}};var curForms=[];function formAjaxRunExternal(b,d){if(top.curForms[b]){var c=top.curForms[b]}else{var c=top.$("#"+b).find("form")}if(c){var a=top.$("#"+c.target)[0];a.contentWindow.AJAX_runExternal=d}}(function(a){a.fn.scrollGoTo=function(b){b=a.extend({min:50,speed:150},b);return this.each(function(){var c=a(this);c.hide();a(window).scroll(function(){if(a(window).scrollTop()>=b.min){c.fadeIn(b.speed)}else{c.fadeOut(b.speed)}})})}})(jQuery);(function(a){a.fn.imgJumpUp=function(b){b=a.extend({img:null,tag:"i",dis:3,speed:100},b);return this.each(function(){var c=a(this);c.hover(function(){var d=a(b.img);if(!d.length){d=c.find(b.tag);if(!d.length){return}}d.animate({top:"-="+b.dis*3+"px"},b.speed*2).animate({top:"+="+b.dis*4+"px"},b.speed*2).animate({top:"-="+b.dis*3+"px"},b.speed*1.5).animate({top:"+="+b.dis*2+"px"},b.speed*1.5).animate({top:"-="+b.dis+"px"},b.speed).animate({top:"+="+b.dis+"px"},b.speed)},function(){})})}})(jQuery);(function(a){a.fn.contentShow=function(b){var c={action:"click",timeOut:50000,hideOnEsc:true,overlayHideOnClick:true,overlayBackgroundColor:"black",overlayId:"body-overlay",overlayOpacity:0.5,overlayZIndex:150,showDuration:500,hideDuration:500,contentBoxId:null,contentBoxHideId:null};b=a.extend(c,b||{});if(b.action=="hover"){b.action="mouseenter"}return this.each(function(){el=a(this);el.bind(b.action,function(){if(b.overlayId){var f=a("#"+b.overlayId);if(!f.length){f=a("<div />").attr({id:b.overlayId}).css({position:"absolute",height:"100%",width:"100%",left:0,top:0,"background-color":b.overlayBackgroundColor,"z-index":b.overlayZIndex,opacity:b.overlayOpacity}).appendTo(a(document.body))}else{b.overlayZIndex=f.css("z-index")}f.fadeIn(b.showDuration*2);if(b.overlayHideOnClick){f.click(function(){g();return false})}}var d=null;var g=function(){if(b.hideOnEsc){a(document).unbind("keyup")}if(d){d.hide(b.hideDuration)}if(b.overlayId){f.fadeOut(b.hideDuration*2)}};var e=setTimeout(function(){g()},b.timeOut);if(b.contentBoxId){d=a("#"+b.contentBoxId);if(!d.length){d=null}else{if(d.css("z-index")<=b.overlayZIndex){d.css("z-index",b.overlayZIndex+10)}d.show(b.showDuration);if(b.contentBoxHideId){a("#"+b.contentBoxHideId).click(function(){g();return false})}}}if(b.hideOnEsc){a(document).bind("keyup",function(h){if(h.which==27){g();return false}})}return false})})}})(jQuery);(function(a){a.fn.imageHoverUp=function(b){var e={speedView:400,speedHide:400,speedTitle:800,altView:false,altPref:"",altColor:"black",altFontSize:"130%",altFontWeight:"bold",titleClass:null,imageHoverId:"img-hover-up",scale:50,autoClose:50000,boxCSS:null,boxBorder:null,boxBorderRadius:null,boxShadow:null,boxClass:null};var c=a.extend(e,b||{});c.scale=1+c.scale/100;var d=null;var f=function(){if(d!=null&&d.length&&d.is(":visible")==true){d.fadeOut(c.speedHide)}};return this.each(function(){var i=a(this);var h=i.find("img");if(!h.length){return}var g=null;h.hover(function(){if(c.autoClose>0){var s=setTimeout(function(){f()},c.autoClose)}var u=h.width(),n=h.height();var p=h.css("z-index");if(p=="auto"||isNaN(parseInt(p))){p=0}var k=h.offset();if(!d){d=a("#div-"+c.imageHoverId);if(!d.length){d=a("<div />").attr({id:"div-"+c.imageHoverId}).css({position:"absolute"}).appendTo(a(document.body)).bind("mouseleave",function(){f()});if(c.boxBorder!=null){d.css({border:c.boxBorder})}if(c.boxBorderRadius!=null){d.css({"border-radius":c.boxBorderRadius,"-webkit-border-radius":c.boxBorderRadius,"-moz-border-radius":c.boxBorderRadius})}if(c.boxShadow!=null){d.css({"box-shadow":c.boxShadow,"-webkit-box-shadow":c.boxShadow,"-moz-box-shadow":c.boxShadow})}if(c.boxCSS!=null){d.css(c.boxCSS)}if(c.boxClass!=null){d.addClass(c.boxClass)}}}var t=parseInt(u*c.scale),l=parseInt(n*c.scale);var o=k.left-parseInt((t-u)/2),v=k.top-parseInt((l-n)/2);var r=d.find("img"),j=true;if(r.length){if(r.attr("id")==(c.imageHoverId+"-"+o+"-"+v)){j=false}else{f();d.empty()}}if(j){d.css({display:"none","z-index":p+5,left:o+"px",top:v+"px"});g=h.clone().appendTo(d).css({height:l+"px",width:t+"px"}).attr({id:c.imageHoverId+"-"+o+"-"+v});if(c.altView==true){var m=h.attr("alt");if(m.length!=0){var q=a('<div align="center">'+c.altPref+m+"</div>").prependTo(d).css({position:"absolute",display:"none",width:"100%",color:c.altColor,fontSize:"60%",fontWeight:c.altFontWeight});if(c.titleClass!=null){q.addClass(c.titleClass)}}}}if(d.is(":visible")!=true){d.stop(true,true).fadeIn(c.speedView,function(){var w=d.find("div");if(w.length){w.show().animate({marginTop:l+5+"px",fontSize:c.altFontSize},c.speedTitle)}})}},function(){})})}})(jQuery);jQuery.cookie=function(b,j,m){if(typeof j!="undefined"){m=m||{};if(j===null){j="";m.expires=-1}var e="";if(m.expires&&(typeof m.expires=="number"||m.expires.toUTCString)){var f;if(typeof m.expires=="number"){f=new Date();f.setTime(f.getTime()+(m.expires*24*60*60*1000))}else{f=m.expires}e="; expires="+f.toUTCString()}var l=m.path?"; path="+(m.path):"";var g=m.domain?"; domain="+(m.domain):"";var a=m.secure?"; secure":"";document.cookie=[b,"=",encodeURIComponent(j),e,l,g,a].join("")}else{var d=null;if(document.cookie&&document.cookie!=""){var k=document.cookie.split(";");for(var h=0;h<k.length;h++){var c=jQuery.trim(k[h]);if(c.substring(0,b.length+1)==(b+"=")){d=decodeURIComponent(c.substring(b.length+1));break}}}return d}};$(function(){$("input:[type=text], input:[type=password]").live("focusin",function(){$(this).addClass("input-focus")}).live("focusout",function(){$(this).removeClass("input-focus")})});
