var rootPath="/";function loadPage(){try{google.load("jquery","1.6")}catch(a){}google.setOnLoadCallback(onFocusSearch);google.setOnLoadCallback(frukterHeaderMenu)}function callBackLoadCounters(){jQuery("#counters").load(rootPath+"rpc/counters.htm",{deviceFullTitle:"count"})}function loadCounters(){google.setOnLoadCallback(callBackLoadCounters)}function updateTypicalImg(){jQuery("ul.typical a:hidden").each(function(c){var b=jQuery(this);b.html(jQuery("<img>").attr("src",b.text()).attr("title",b.attr("title")));b.show()})}function loadRoofPage(){google.setOnLoadCallback(updateTypicalImg)}function fixColorsMenu(){jQuery(".colors li.active").prev("li").find("span:last").addClass("delim-2")}function fixPriceMenu(){jQuery(".price_ch li").click(function(){if(!jQuery(this).hasClass("active")){jQuery(this).addClass("active");jQuery(this).find("span").removeClass("delim-2");jQuery(this).prev("li").find("span").addClass("delim-2");jQuery(this).prev("li").removeClass("active");jQuery(this).next("li").removeClass("active");jQuery("#about-hold .buy").toggleClass("hide")}})}function initOrderModalWindow(){var b=jQuery("#dialogNew");var a=b.text();jQuery("#want").click(function(){jQuery("#overlay").show();b.show();try{_gaq.push(["_trackPageview","/order"]);yaCounter165406.reachGoal("order")}catch(c){}});b.load(rootPath+"rpc/orderForm.htm?1",function(f,g,e){var c="#orderForm";var d=jQuery(c+" a.close");jQuery.getScript(rootPath+"js/jquery.form.js",function(){jQuery(c+" a.order-button").click(function(){if(jQuery("#orderFormPhone").val().length>5){try{_gaq.push(["_trackPageview","/order/sent"]);yaCounter165406.reachGoal("order_done")}catch(h){}jQuery(c).submit()}});initCallBackForm()});jQuery("#dialogNew h3 span").html(a);jQuery(c+" input.model").val(a);d.click(function(){b.hide();jQuery("#overlay").hide()})})}function initCallBackForm(){var a="#callbackForm";jQuery(a+" input.submit").click(function(){jQuery(".fallBack li.info").hide();if(jQuery(a+" input.input").val().length>5){try{_gaq.push(["_trackPageview","/callback/sent"]);yaCounter165406.reachGoal("callback_done")}catch(b){}jQuery(a).ajaxSubmit(function(){jQuery(".fallBack li.success b").html(jQuery(a+" input.input").val());jQuery(a+" input.input").val("");jQuery(".fallBack li.success").show()})}else{jQuery(".fallBack li.error").show()}})}function loadModalScript(){google.setOnLoadCallback(initOrderModalWindow)}function loadDevicePage(){google.setOnLoadCallback(fixColorsMenu);google.setOnLoadCallback(fixPriceMenu);loadModalScript()}function loadCalendarPage(){loadModalScript()}function onFocusSearch(){var a=jQuery("#searchInput");a.focus(function(){jQuery(this).val("");jQuery(this).removeClass("noFocus")})}function fixPNG(a){if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var b;if(a.tagName=="IMG"){if(/\.png$/.test(a.src)){b=a.src;a.src="img/blank.gif"}}else{b=a.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(b){b=b[1];a.runtimeStyle.backgroundImage="none"}}if(b){a.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b+"',sizingMethod='image')"}}}function fixPNG_bg(a){if(/MSIE (5\.5|6).+Win/.test(navigator.userAgent)){var b;if(a.tagName=="IMG"){if(/\.png$/.test(a.src)){b=a.src;a.src="img/blank.gif"}}else{b=a.currentStyle.backgroundImage.match(/url\("(.+\.png)"\)/i);if(b){b=b[1];a.runtimeStyle.backgroundImage="none"}}if(b){a.runtimeStyle.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b+"',sizingMethod='scale')"}}}function frukterHeaderMenu(){var c=jQuery("#header > .tab-menu");var a=jQuery("#mainIn > .content > .subMenuContainer");var b=jQuery(".submenu");if(a.length>0){jQuery(c).ready(function(){var e=0;var h=false;c.hover(function(){h=true},function(){h=false});c.children("li").hover(function(){var i=jQuery(this);if(!h){e=setTimeout(function(){d(i);g(i.index())},1000)}else{d(i);g(i.index())}},function(){clearInterval(e)});c.find("a").click(function(){var i=jQuery(this).parents("li");clearInterval(e);d(i);g(i.index());return false});b.find("a").click(function(){f(this);return false});function d(i){if(!i.hasClass("active")){c.find(".delim-2").removeClass("delim-2");c.children(".active").removeClass("active");if(i.index()>0){i.prev().children("span").addClass("delim-2")}i.addClass("active")}}function f(i){b.children(".active").removeClass("active");jQuery(i).parents("li").addClass("active")}function g(i){var k=a.children(":visible");if(k.index()!=i){k.stop();var j=a.children(":eq("+(i)+")");if(k.length>0){k.fadeOut("fast",function(){j.fadeTo("normal",1)})}else{j.fadeTo("normal",1)}}}})}}loadPage();
