function cjc(){ if (!$.cookie('cjc_confirmed') && $.cookie('electrolux-kaminy.com.ua')) $.ajax({ url: "/cgi-bin/myAccount/myAccount.cgi?action=cjc&ajax=1&ajaxFixDisable=1&disableCss=1&vs=2/scId=6", success: function(){ $.cookie('cjc_confirmed', '1'); } }); } window.onscroll = function() {scrollFunction()}; function scrollFunction() { if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { // document.getElementById("scroll_to_top_btn").style.display = "block"; $("#scroll_to_top_btn").fadeIn(); } else { // document.getElementById("scroll_to_top_btn").style.display = "none"; $("#scroll_to_top_btn").fadeOut(); } } function scroll_to_top() { document.body.scrollTop = 0; // For Chrome, Safari and Opera document.documentElement.scrollTop = 0; // For IE and Firefox } $(document).ready(function () { $(document).ready(function () { $.ajax({ url: "/cgi-bin/myAccount/myAccount.cgi?action=cjc&ajax=1&ajaxFixDisable=1&disableCss=1&vs=2/scId=6" }); cjc(); if (!$.cookie('electrolux-kaminy.com.ua')) $.ajax({ url: "/cgi-bin/myAccount/myAccount.cgi?action=cjc&request_cookie=1&ajax=1&ajaxFixDisable=1&disableCss=1&vs=2/scId=6", success: function(){ cjc(); } }); $("#modal_bascket .btn_order a").addClass("btn btn-success"); $(".langs a").each(function (i){ if (window.location.search == "" && window.location.pathname != "/") $(this).attr("href", "/" + $(this).attr("lang") + window.location.pathname.substring(3)); if ($(this).attr("href") == "/ru/") $(this).attr("href", "/"); }); $( "#slider-range" ).slider({ range: true, min: 200, max: 415, values: [ 200, 415 ], slide: function( event, ui ) { $( "#priceFrom" ).val( ui.values[ 0 ] ); $( "#priceTo" ).val( ui.values[ 1 ] ); } }); $(".btn_bascket").click(function(){ }); $('.readmore').readmore({ speed: 50 ,moreLink: 'Читать дальше' ,lessLink: 'Скрыть' ,beforeToggle: function(trigger, element, expanded) { if(expanded) { // The "Close" link was clicked } else { $(element).removeClass("readmore_closed").addClass("readmore_opened"); } } ,afterToggle: function(trigger, element, expanded) { if(expanded) { // The "Open" link was clicked $(element).css("height", ""); // fix mobile bug var h = $(element).height(); // fix mobile bug $(element).height(h); // fix mobile bug } else { $(element).removeClass("readmore_opened").addClass("readmore_closed"); } } }); // $('.readmore .readmore_fade_top').click(function(){ $(this).closest("div.readmore").readmore('toggle'); }); }); $.ajax({ url: "/cgi-bin/myAccount/myAccount.cgi?action=cjc&ajax=1&ajaxFixDisable=1&disableCss=1&vs=2/scId=6" }); cjc(); if (!$.cookie('electrolux-kaminy.com.ua')) $.ajax({ url: "/cgi-bin/myAccount/myAccount.cgi?action=cjc&request_cookie=1&ajax=1&ajaxFixDisable=1&disableCss=1&vs=2/scId=6", success: function(){ cjc(); } }); $("#modal_bascket .btn_order a").addClass("btn btn-success"); $(".langs a").each(function (i){ if (window.location.search == "" && window.location.pathname != "/") $(this).attr("href", "/" + $(this).attr("lang") + window.location.pathname.substring(3)); if ($(this).attr("href") == "/ru/") $(this).attr("href", "/"); }); $( "#slider-range" ).slider({ range: true, min: 200, max: 415, values: [ 200, 415 ], slide: function( event, ui ) { $( "#priceFrom" ).val( ui.values[ 0 ] ); $( "#priceTo" ).val( ui.values[ 1 ] ); } }); $(".btn_bascket").click(function(){ }); $('.readmore').readmore({ speed: 50 ,moreLink: 'Читать дальше' ,lessLink: 'Скрыть' ,beforeToggle: function(trigger, element, expanded) { if(expanded) { // The "Close" link was clicked } else { $(element).removeClass("readmore_closed").addClass("readmore_opened"); } } ,afterToggle: function(trigger, element, expanded) { if(expanded) { // The "Open" link was clicked $(element).css("height", ""); // fix mobile bug var h = $(element).height(); // fix mobile bug $(element).height(h); // fix mobile bug } else { $(element).removeClass("readmore_opened").addClass("readmore_closed"); } } }); // $('.readmore .readmore_fade_top').click(function(){ $(this).closest("div.readmore").readmore('toggle'); }); });