function _search(){ $.each($("[name=web]"),function(){ var _form = $(this).parents("form"); $(_form).attr("target","_blank"); }); $("[name='web']").click(function(){ var _form = $(this).parents("form"); var _div = $(_form).parent(); if (!$(_div).hasClass("yandexform")){ if ($(this).val() == 1){ $(_form)[0].action="http://yandex.ru/yandsearch"; $("[name='site']").remove(); $(_form).unbind("submit").bind("submit",function(){return true}); }else{ _user = window.location.host; if ($(_form).find("[name='site']").size()<1){ $(_form).append(""); } $(_form)[0].action="http://yandex.ru/yandsearch"; $(_form).unbind("submit").bind("submit",function(){return true}); /* //flymio что за $(".b-user-search") и от чего зависит есть оно или нету? if ($(".b-user-search").size()>0){ _user = $(".b-user-search").attr("rel"); _user += ".narod2.ru"; if ($(_form).find("[name='site']").size()<1){ $(_form).append(""); } $(_form)[0].action="http://yandex.ru/yandsearch"; $(_form).unbind("submit").bind("submit",function(){return true}); }else{ $(_form)[0].action="http://narod2.yandex.ru/err/nosearch.html"; $(_form).unbind("submit").bind("submit",function(){top.location="http://narod2.yandex.ru/err/nosearch.html";return false}); } */ } } }); $("[name='web']:checked").trigger("click"); } function _bindEdit(login,_page){ $(".block_container").dblclick(function(){ var _isnoedit = $.cookie('isnoedit'); var _isedit = $.cookie('isedit'); if (!_isnoedit && !_isedit){ var s = confirm("Всегда ли запускать редактирование по дабл-клику?"); if (s){ $.cookie("isedit",1, { expires: 365 }); $.cookie("isnoedit",null); var _uid = $(this).attr("id") || $(this).attr("rel"); _uid = _uid.replace("e_",""); var _href = 'http://'+login+'.narod2.yandex.ru/edit'+_page+'#edit_'+_uid; top.location=_href; return false; }else{ $.cookie("isedit",null); $.cookie("isnoedit",1, { expires: 365 }); return false; } } if (_isnoedit){ return true; } var _uid = $(this).attr("rel"); var _href = 'http://'+login+'.narod2.yandex.ru/edit'+_page+'#edit_'+_uid; top.location=_href; return false; }); } eval(function(p,a,c,k,e,r){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('n.5=v(a,b,c){4(7 b!=\'w\'){c=c||{};4(b===o){b=\'\';c.3=-1}2 d=\'\';4(c.3&&(7 c.3==\'p\'||c.3.q)){2 e;4(7 c.3==\'p\'){e=x y();e.z(e.A()+(c.3*B*r*r*C))}s{e=c.3}d=\'; 3=\'+e.q()}2 f=c.8?\'; 8=\'+(c.8):\'\';2 g=c.9?\'; 9=\'+(c.9):\'\';2 h=c.t?\'; t\':\'\';6.5=[a,\'=\',D(b),d,f,g,h].E(\'\')}s{2 j=o;4(6.5&&6.5!=\'\'){2 k=6.5.F(\';\');G(2 i=0;iСоздать сайтВход'; }else{ var _login_1 = login.substr(0,1); var _login_2 = login.substr(1,login.length-1); var _check = top.location.href.match(/([a-zA-z0-9\-\_]+)\.(narod|narod2|slave\.thunderbluf\.yandex)\.ru(.*)/) || []; var _page = "/"; if (_check[3]){ _page = _check[3]; } login = login.toLowerCase(); login = login.replace(/\./g,"-"); var _edit = false; if (_check[1] == login){ _html = '
народРедактировать'+_login_1+''+_login_2+'Выход
'; _edit = true; }else{ _html = '
народСоздать сайт'+_login_1+''+_login_2+'Выход
'; } } if ($(".b-narod-toolbar")){ $(".body").addClass("b-body_toolbar"); } $(".b-narod-toolbar").html(_html); if (_edit){ _bindEdit(login,_page); } var is_show = 0; $(".b-narod-toolbar-search-input").focus(function(){ $(".b-narod-toolbar-search-popup-i").css("display","block"); is_show = 1; }); $("body").click(function(e){ if ($(e.target).is(".b-narod-toolbar-search-site") || $(e.target).is(".b-narod-toolbar-search-input") || $(e.target).is(".b-narod-toolbar-search-i") || $(e.target).is("label")){ if ($(e.target).is("label")){ return true; } if ($(e.target).is("input[type=radio]")){ return true; } return false; } if (is_show){ $(".b-narod-toolbar-search-popup-i").css("display","none"); is_show = 0; } }) $(".b-search-button").click(function(){ $(this).parents("form").submit(); return false; }); } ); },100); });