var opswin; var top_=10; var left_=10; function adm_opwin(a,w,h){ if (navigator.userAgent.toLowerCase().indexOf("opera")==-1 && opswin!=null && !opswin.closed)opswin.close(); //tops(w,h); opswin=window.open(a,'',"height="+h+",width="+w+",status=yes,toolbar=no,menubar=no,location=yes,top="+top_+",left="+left_+",scrollbars=yes,resizable=yes"); opswin.focus(); } function tops(w,h){ if(navigator.appName == "Netscape") { top_=window.innerHeight/2-h/2; left_=window.innerWidth/2-w/2; } else{ top_=document.body.clientHeight/2-h/2; left_=document.body.clientWidth/2-w/2; } if(top_<0)top=0; if(left_<0)top=0; } var ind=0; function iframe_href(a){ window.frames['iframe_index'+ind].location.href='iframe_index.php?'+a; if(++ind>4)ind=0; } function iframe_href_select(a,i){ window.frames['iframe_index'+i].location.href='/adm/iframe_index.php?'+a; } function popwin(nam,w,h){ var linkk='/popwin.html?link='+nam; //tops(w,h); var scrollbars='no'; if(w>1000 || h>800){ w=w+16; h=h+16; scrollbars='yes'; } param = 'top='+top_+',left='+left_+',width='+w+',height='+h; if(navigator.userAgent.toLowerCase().indexOf("opera")==-1 && opswin!=null && !opswin.closed)opswin.close(); opswin=window.open(linkk,'',param+',status=no,toolbar=no,menubar=no,scrollbars='+scrollbars+',resizable=yes'); opswin.focus(); return false; } var edit_layer_id_old='-'; function edit_layer_show(a){ edit_layer_cleartimeout(); if(edit_layer_id_old!='-' && document.getElementById('t'+edit_layer_id_old)){ document.getElementById('t'+edit_layer_id_old).style.display='none'; edit_layer_id_old='-'; } if(document.getElementById('t'+a)){ document.getElementById('t'+a).style.display='block'; edit_layer_id_old=a; } } function edit_layer_hide(a){ if(document.getElementById('t'+a))document.getElementById('t'+a).style.display='none'; } var edit_layer_timeout; function edit_layer_hide_timeout(a){ edit_layer_timeout=setTimeout("edit_layer_hide('"+a+"')",500); } function edit_layer_cleartimeout(){ clearTimeout(edit_layer_timeout); } var start_div='-'; function show_alt_mouse(nim,t){ if(document.getElementById("div_"+nim) ){ show_alt_cleartimeout(); var d=document.getElementById("div_"+nim).style; show_alt_hide(start_div); start_div=nim; d.display='block'; } } function show_alt_hide(a){ if(document.getElementById('div_'+a)){ document.getElementById('div_'+a).style.display='none'; } } var show_alt_timeout; function show_alt_hide_timeout(a){ show_alt_timeout=setTimeout("show_alt_hide('"+a+"')",500); } function show_alt_cleartimeout(){ clearTimeout(show_alt_timeout); } if(typeof($)!='undefined'){ $(function(){ if (typeof jQuery.fn.live == 'undefined' || !(jQuery.isFunction(jQuery.fn.live))) { jQuery.fn.extend({ live: function (event, callback) { if (this.selector) { jQuery(document).on(event, this.selector, callback); } } }); } //if (typeof jQuery == "function" && ('ui' in jQuery) && jQuery.ui && ('version' in jQuery.ui)){ /* $('.image-link').magnificPopup({ type: 'image', mainClass: 'mfp-with-zoom', // this class is for CSS animation below zoom: { enabled: true, // By default it's false, so don't forget to enable it duration: 300, // duration of the effect, in milliseconds easing: 'ease-in-out', // CSS transition easing function opener: function(openerElement) { return openerElement.is('img') ? openerElement : openerElement.find('img'); } }, gallery:{ enabled:true, arrowMarkup: '', tPrev: 'предыдущая', // title for left button tNext: 'следующая', // title for right button tCounter: '%curr% of %total%' } });*/ //beautiful otkritie $('a.img_middle_beauti').live("click",function () { //$(document).on("click", "a.img_middle_beauti",function(){ var w=$(this).attr('desc_w'); var h=$(this).attr('desc_h'); var a=$(this).attr('desc_a'); //alert(a); var temp=''; temp+='
'; $('#img_big_beauti').html(temp).fadeIn("slow"); $('#img_big_beauti').width(w*1+120); $('#img_big_beauti').height(h*1+120); set_position_beauti(w*1+120,h*1+120); }); $('#close_beauti').live("click",function () { //$(document).on("click", "#close_beauti",function(){ $('#img_big_beauti').fadeOut("slow"); return false; }); //close by ESC $(document).keydown(function(e) { var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0; //alert(key); switch(key) { case 27: $('#img_big_beauti').fadeOut("slow"); break;// esc } }); //end $(".spoiler").each(function(){ var obj=$(this); var first=obj.children(":first");//:not(ul,table).filter("a,b,i,div,span,strong,em,h1,h2,h3,h4"); //alert(first.html()); var head=$("