$(document).ready(function(){ var s = { 'animateSpeed' : 250, 'mobiWidth' : 1024, // mobi max width 'scrollSpeed' : 1000, 'isMobi' : false, // technic variable 'timeCloseModal' : 2000 } $('.taneko').hover( function() { $('.taneko_center').stop( true, true ).animate({ width: '246px' }, s.animateSpeed); $('.taneko_centerr p').stop(true, true).animate({ opacity: 1 }, s.animateSpeed); }, function() { $('.taneko_center').stop( true, true ).animate({ width: 0 }, s.animateSpeed); $('.taneko_center p').stop(true, true).animate({ opacity: 0 }, s.animateSpeed); }); //var mtditem=$('#pageMainmenu .mtditem').css('background-color'); var txtitem=$('#pageMainmenu .menu').css('color'); var mtditem=$('.osnmenu a').css('background-color'); var mtcitem=$('.osnmenu a').css('color'); var mtdkor=$('#korzina').css('background-color'); var mtdfind=$('#findtop').css('background-color'); var mtdrek=$('.reklamatext').css('background-color'); var mtdrekc=$('.reklamatitle a').css('color'); var animcolor=$('#animateMainmenucolor').css('background-color'); var S_item=$('#imgmenu').css('background-color'); var S_mobitem=$('#imgmobmenu').css('background-color'); var mobcert=$('#mobcert').css('background-color'); var S_mobmenu_object = $("div").find('#S_mobmenu'); var S_mobmenu_out = "0"; var height_title = $('#pageTitle').height(); var page_site=window.location.pathname; //if (page_site == '/') { $("#leftmenu").css('display','none');$("#contents").css('width','100%');} else {$('#divfonimg').css('display','block');} if($("div").is(".div_center_content #divfonimg")) { if($("img").is("#content1 #cont_news .contentImage")) { var cont_img=$(".div_center_content"); var fon_img=$(".div_center_content #divfonimg"); var news_tag=$("#content1 #cont_news"); var img_tag=$("#content1 #cont_news .contentImage"); var img_src = img_tag.attr("src"); var imgteg = ''; fon_img.html(imgteg); var imgteg_height = fon_img.height(); width_cont=cont_img.width(); height_cont=width_cont*600/2000; img_tag.remove(); var height_imgteg = height_cont - height_title; if (height_imgteg>0) news_tag.height(height_imgteg); } } if($('div').is('#animateMainmenucolor')) { var animcolor=$('#animateMainmenucolor').css('background-color'); } else { var animcolor='#00ACE4';} if(animcolor=='transparent') {animcolor='#00ACE4';} // $('.osnmenu a').hover( // function(){ $(this).stop().animate({ backgroundColor: animcolor, color: '#000'}, 500);}, // function(){ $(this).stop().animate({ backgroundColor: mtditem, color: mtcitem}, 500);}); $('#pageMainmenu .menu').hover( function(){ $(this).stop().animate({ color: animcolor}, 500);}, function(){ $(this).stop().animate({ color: txtitem}, 500);}); $('#hidemenu .mtditem').hover( function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, function(){ $(this).stop().animate({ backgroundColor: mtditem }, 500);}); // $('#korzina').hover( // function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, // function(){ $(this).stop().animate({ backgroundColor: mtdkor }, 500);}); $('#findtop').hover( function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, function(){ $(this).stop().animate({ backgroundColor: mtdfind }, 500);}); $('.reklamatext').hover( function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, function(){ $(this).stop().animate({ backgroundColor: mtdrek}, 500);}); $('.reklamatitle a').hover( function(){ $(this).stop().animate({ color: animcolor}, 500);}, function(){ $(this).stop().animate({ color: mtdrekc}, 500);}); $('#imgmenu').hover( function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, function(){ $(this).stop().animate({ backgroundColor: S_item }, 500);}); $('.foto__tovar').hover( function(){ $(this).find('.i_view').stop(true,true).animate({opacity: "show", display: 'block'}, "slow");}, function(){ $(this).find('.i_view').stop(true,true).animate({opacity: "hide", display: 'none'}, "slow");} ); $('.foto_tovar').hover( function(){ $(this).find('.i_view').stop(true,true).animate({opacity: "show", display: 'block'}, "slow");}, function(){ $(this).find('.i_view').stop(true,true).animate({opacity: "hide", display: 'none'}, "slow");} ); $('#imgmobmenu').hover( function(){ $(this).stop().animate({ backgroundColor: animcolor}, 500);}, function(){ if(S_mobmenu_object.css('display') == 'block') { if(S_mobmenu_out == '1') { $(this).stop().animate({ backgroundColor: S_mobitem }, 500); } else { $(this).stop().animate({ backgroundColor: S_item }, 500); } } else { //alert('ss'); $(this).stop().animate({ backgroundColor: S_mobitem }, 500); } }); $('.minimized').click(function(e) { e.stopPropagation(); var i_path = $(this).attr('src'); var minimizedHTML = '
'; $('body').append(minimizedHTML); var magnify = $('#full_image').children('#magnify'); $('#overlay, #magnify').fadeIn('fast'); }); $(window).scroll(function() { if( $(this).scrollTop() != 0) { $('#toTop').fadeIn(); } else { $('#toTop').fadeOut();} }); $('#toTop').click(function() { $('body,html').animate({scrollTop:0},800); }); $(window).resize(function() { if(S_mobmenu_object.css('display') == 'block') $("#divmobmenu").css('display', 'block'); $("#S_imgmobmenu ").children("#mobcert").css('background-color', mobcert); $("#S_imgmobmenu").children("#mobcert").stop(true,true).animate({opacity: "show", display: 'block'}, "normal"); $("#S_imgmobmenu").children("#mobcros4").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_imgmobmenu").children("#mobcros5").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_menu").stop(true,true).animate({opacity: "hide", top: "-85"}, "normal"); $("#S_mobmenu").stop(true,true).animate({opacity:"hide"}, "normal"); $("#S_mobmenu_content").stop(true,true).animate({opacity:"hide", left: "-85"}, "normal"); $("#imgmobmenu").stop().animate({ backgroundColor: S_mobitem }, 500); $("#divtopmenu").css('height', ''); // enableScroll(); if($("body").css('overflow') == 'hidden') { $("body").css('overflow', 'visible'); $("#sitepage").css('width', '100%'); $("#sitepage").css('marginRight', '0px'); $(".knopikBut").css('left', '-27px'); $("#divmenutop").css('marginRight', '0px'); $("#toTop").css('marginRight', '0px'); $("body").css('width', '100%'); $("body").css('marginRight', '0px'); } }); // раскрывающееся меню //$('.viewmenu .hide').hide(); $('.viewmenu .menu').click(function(e){ e.stopPropagation(); if ($(this).next().css('display') == 'block') { $(this).next().slideToggle(); $(this).next().css('backgroundColor', '#fafafa'); $(this).css('backgroundColor', 'transparent'); } else { var clickId = $(this).attr('id'); typid = clickId.split('_'); // alert(' a - ' + typid[1]); //window.name=activecity; $('.viewmenu .hide').stop(false, true).slideUp(500); $('.viewmenu .main').css('backgroundColor', 'transparent'); $(this).css('backgroundColor', '#f3f3f3'); $(this).next().slideToggle(); $(this).next().css('backgroundColor','#fafafa'); } }); //это работало /* $('.viewmenu .hide').hide(); $('.viewmenu .menu').click(function(){ if ($(this).next().css('display') == 'block') { $(this).next().slideToggle(); $(this).next().css('backgroundColor', '#fafafa'); $(this).css('backgroundColor', 'transparent'); } else { $('.viewmenu .hide').stop(false, true).slideUp(500); $('.viewmenu .main').css('backgroundColor', 'transparent'); $(this).next().slideToggle(); $(this).css('backgroundColor', '#f3f3f3'); $(this).next().css('backgroundColor','#fafafa'); alert($(this).scrollTop()); } }); */ $('body').click(function(e){ $("#S_imgmobmenu ").children("#mobcert").css('background-color', mobcert); $("#S_imgmobmenu").children("#mobcert").stop(true,true).animate({opacity: "show", display: 'block'}, "normal"); $("#S_imgmobmenu").children("#mobcros4").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_imgmobmenu").children("#mobcros5").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_menu").stop(true,true).animate({opacity: "hide", top: "-85"}, "normal"); $("#S_mobmenu").stop(true,true).animate({opacity:"hide"}, "normal"); $("#S_mobmenu_content").stop(true,true).animate({opacity:"hide", left: "-85"}, "normal"); $("#imgmobmenu").stop().animate({ backgroundColor: S_mobitem }, 500); $("#divtopmenu").css('height', ''); // enableScroll(); if($("body").css('overflow') == 'hidden') { $("body").css('overflow', 'visible'); $("#sitepage").css('width', '100%'); $("#sitepage").css('marginRight', '0px'); $(".knopikBut").css('left', '-27px'); $("#divmenutop").css('marginRight', '0px'); $("#toTop").css('marginRight', '0px'); $("body").css('width', '100%'); $("body").css('marginRight', '0px'); } if($("#overlay").css('display') == 'block') { closeclose=0; if (e.target.id=="closeclose") closeclose=1; else if ($(e.target).closest("#tovar_view").length) closeclose=0; else closeclose=1; if (closeclose==0) return; else { $('#overlay, #tovar_view, #magnify').fadeOut('fast', function() { $('#close-popup, #tovar_view, #magnify, #full_image, #overlay').remove(); }); } e.stopPropagation(); } }); $("#S_menu").stop(true,true).animate({opacity: "hide", top: "-85", display: 'none'}, "normal"); $("#S_mobmenu").stop(true,true).animate({opacity: 0.8, display: 'none'}, "normal"); $("#S_mobmenu_content").stop(true,true).animate({opacity: "hide", left: "-85"}, "normal"); $('#imgmenu').click(function(e){ e.stopPropagation(); var object = $(this).next('#S_menu'); if(object.css('display') == 'block') {$("#S_menu").stop(true,true).animate({opacity: "hide", top: "-85", display: 'none'}, "normal"); } else {$("#S_menu").stop(true,true).animate({opacity: "show", top: "0", display: 'block'}, "slow");} }); $('#imgmobmenu').click(function(m){ m.stopPropagation(); if(S_mobmenu_object.css('display') == 'block') { $("#divtopmenu").css('height', ''); $("#S_mobmenu").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); //enableScroll(); if($("body").css('overflow') == 'hidden') { $("body").css('overflow', 'visible'); $("#sitepage").css('width', '100%'); $("#sitepage").css('marginRight', '0px'); $(".knopikBut").css('left', '-27px'); $("#divmenutop").css('marginRight', '0px'); $("#toTop").css('marginRight', '0px'); $("body").css('width', '100%'); $("body").css('marginRight', '0px'); } $("#S_imgmobmenu").children("#mobcert").stop(true,true).animate({opacity: "show", display: 'block'}, "normal"); $("#S_imgmobmenu").children("#mobcros4").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_imgmobmenu").children("#mobcros5").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_imgmobmenu").children("#mobcert").css('background-color', mobcert); S_mobmenu_out = "1"; } else { $("#divtopmenu").css('height', '100%'); $("#S_mobmenu").stop(true,true).animate({opacity: "show", display: 'block'}, "slow"); //disableScroll(); if($("body").css('overflow') != 'hidden') { var w1 = $("body").width(); $("body").css('overflow', 'hidden'); var w2 = $("body").width(); if (w2!=w1) { w3 = w2 - w1; $("#sitepage").css('width', 'calc(100% - ' + (w3+0) + 'px)'); $("#sitepage").css('marginRight', w3 + 'px'); $(".knopikBut").css('left', (-27-w3) +'px'); $("#divmenutop").css('marginRight', w3 + 'px'); $("#toTop").css('marginRight', w3 + 'px'); $("body").css('width', (w1-0) + 'px'); $("body").css('marginRight', w3 + 'px'); } } $("#S_imgmobmenu").children("#mobcert").stop(true,true).animate({opacity: "hide", display: 'none'}, "normal"); $("#S_imgmobmenu").children("#mobcros4").stop(true,true).animate({opacity: "show", display: 'block'}, "normal"); $("#S_imgmobmenu").children("#mobcros5").stop(true,true).animate({opacity: "show", display: 'block'}, "normal"); $("#imgmobmenu").stop().animate({ backgroundColor: S_mobitem }, 500); S_mobmenu_out = "0"; } var object = $("div").next('#S_mobmenu_content'); if(object.css('display') == 'block') { $("#S_mobmenu_content").stop(true,true).animate({opacity: "hide", left: "-85", display: 'none'}, "normal"); } else {$("#S_mobmenu_content").stop(true,true).animate({opacity: "show", left: "0", display: 'block'}, "slow");} }); });/*end ready*/ //функция подсказок для форм $(function(){$("input, textarea").placeholder()});(function(e,t,n){function r(e){var t={};var r=/^jQuery\d+$/;n.each(e.attributes,function(e,n){if(n.specified&&!r.test(n.name)){t[n.name]=n.value}});return t}function i(e,t){var r=this;var i=n(r);if(r.value==i.attr("placeholder")&&i.hasClass("placeholder")){if(i.data("placeholder-password")){i=i.hide().next().show().attr("id",i.removeAttr("id").data("placeholder-id"));if(e===true){return i[0].value=t}i.focus()}else{r.value="";i.removeClass("placeholder");r==o()&&r.select()}}}function s(){var e;var t=this;var s=n(t);var o=this.id;if(t.value==""){if(t.type=="password"){if(!s.data("placeholder-textinput")){try{e=s.clone().attr({type:"text"})}catch(u){e=n("").attr(n.extend(r(this),{type:"text"}))}e.removeAttr("name").data({"placeholder-password":s,"placeholder-id":o}).bind("focus.placeholder",i);s.data({"placeholder-textinput":e,"placeholder-id":o}).before(e)}s=s.removeAttr("id").hide().prev().attr("id",o).show()}s.addClass("placeholder");s[0].value=s.attr("placeholder")}else{s.removeClass("placeholder")}}function o(){try{return t.activeElement}catch(e){}}var u=Object.prototype.toString.call(e.operamini)=="[object OperaMini]";var a="placeholder"in t.createElement("input")&&!u;var f="placeholder"in t.createElement("textarea")&&!u;var l=n.fn;var c=n.valHooks;var h=n.propHooks;var p;var d;if(a&&f){d=l.placeholder=function(){return this};d.input=d.textarea=true}else{d=l.placeholder=function(){var e=this;e.filter((a?"textarea":":input")+"[placeholder]").not(".placeholder").bind({"focus.placeholder":i,"blur.placeholder":s}).data("placeholder-enabled",true).trigger("blur.placeholder");return e};d.input=a;d.textarea=f;p={get:function(e){var t=n(e);var r=t.data("placeholder-password");if(r){return r[0].value}return t.data("placeholder-enabled")&&t.hasClass("placeholder")?"":e.value},set:function(e,t){var r=n(e);var u=r.data("placeholder-password");if(u){return u[0].value=t}if(!r.data("placeholder-enabled")){return e.value=t}if(t==""){e.value=t;if(e!=o()){s.call(e)}}else if(r.hasClass("placeholder")){i.call(e,true,t)||(e.value=t)}else{e.value=t}return r}};if(!a){c.input=p;h.value=p}if(!f){c.textarea=p;h.value=p}n(function(){n(t).delegate("form","submit.placeholder",function(){var e=n(".placeholder",this).each(i);setTimeout(function(){e.each(s)},10)})});n(e).bind("beforeunload.placeholder",function(){n(".placeholder").each(function(){this.value=""})})}})(this,document,jQuery)