/* $('#vsevolozhsk').replaceWith (function (){return''+$(this).html ()+'';}) $('#kirovsk').replaceWith (function (){return''+$(this).html ()+'';}) $('#koltushi').replaceWith (function (){return''+$(this).html ()+'';}) $('#kioskov').replaceWith (function (){return''+$(this).html ()+'';}) $('#vagonchikov').replaceWith (function (){return''+$(this).html ()+'';}) $('#plit_jbi').replaceWith (function (){return''+$(this).html ()+'';}) $('#blokov').replaceWith (function (){return''+$(this).html ()+'';}) */ jQuery(document).ready(function(){ $(window).on("touchmove.dataurl_change scroll.dataurl_change touchstart.dataurl_change",function(e){dataurl_change();}); $(window).on("touchmove.reklama_none scroll.reklama_none touchstart.reklama_none",function(e){reklama_none();}); jQuery('#fb_call').click(function(e){ msgbox('
','Заказать звонок','zakaz_zvon'); return false; }); jQuery('body').on('click','#lea_msgbox_ok',function(){ if(jQuery(this).attr('data-param')=='zakaz_zvon'){ var form=jQuery(this).parents('#lea_msgbox').find('form').eq(0); jQuery.post('/send_eml.php',form.serialize(),function(data){ if(data){ setTimeout('msgbox("'+data+'")',500); form.trigger('reset'); } }); return false; } }); jQuery('#specialist_form_fixed').on('submit',function(e){ var form = $('#specialist_form_fixed').serialize() $.post('/send_eml.php',form,function(data){ setTimeout('msgbox("'+data+'")',500); }) return false; }) jQuery('#specialist_form').on('submit',function(e){ var form = $('#specialist_form').serialize() $.post('/send_eml.php',form,function(data){ setTimeout('msgbox("'+data+'")',500); }) return false; }) dataurl(); }); function dataurl() { jQuery('[data-url]').click(function(e){ window.open(jQuery(e.target).closest('[data-url]').attr('data-url')); }); jQuery('[data-url]').on('mousedown', function(e) { if (e.which == 2) { window.open(jQuery(e.target).closest('[data-url]').attr('data-url')); return false; } return true; }); } function dataurl_change() { $(window).off("touchmove.dataurl_change scroll.dataurl_change touchstart.dataurl_change"); $('[data-url]').replaceWith(function(){ obj=''+$(this).html()+''; return obj; }); } function getAttributes ( $node ) { var str=''; $.each( $node[0].attributes, function ( index, attribute ) { attrname=attribute.name; if (attrname=="data-url") attrname="href"; str=str+" "+attrname+'="'+attribute.value+'" '; } ); return str; } function reklama_none() { $(window).off("touchmove.reklama_none scroll.reklama_none touchstart.reklama_none"); $('.advert').css('display','none'); }