ow()
},function(){
$(this).children('.itme').hide()
});
//微信指向
$(".wx_ico").hover(function(){
$(".wx_img").show();
},function(){
$(".wx_img").hide();
});
//导航指向
$(".top_web_map").hover(function(){
$(".w_nav_map").show();
},function(){
$(".w_nav_map").hide();
});
hoverCssChange();
//登录状态
$.ajax({
type:"POST",
async:false,
url:SITEURL+"member/login/ajax_is_login",
dataType:'json',
success:function(data){
if(data.status){
$('.login-before').eq(0).addClass('hide');
$txt = '你好!';
$txt += ''+data.user.nickname+'';
$txt += '';
$txt += ' | ';
$txt += '退出';
$('.login-before').eq(1).html($txt);
$.ajax({
type:"POST",
url:SITEURL+'dz/index',
data:{
userid:data.user.mid,
phpfile:'xiao_st14434_no191_header/php/help.php',
classname:'Help',
method:'get_member_level'
},
success:function(datas){
var data = $.parseJSON(datas);
$('.level').text(data.level);
}
});
}else{
$('.login-before').eq(1).addClass('hide');
$txt = '登录';
$txt += ' | ';
$txt += '注册';
$('.login-before').eq(0).html($txt);
}
}
});
$('#fav').addFavorite('收藏本站',location.href);
//搜索点击
$('.s_txt').focus(function(){
$(this).val('');
});
$('.cloud_search').click(function(){
var keyword = $('.g_search').val();
keyword = $.trim(keyword);
var def = $('.g_search').attr('placeholder');
if(keyword==''||keyword==def){
return false;
}else{
var url = SITEURL+'search/cloudsearch?keyword='+encodeURIComponent(keyword);
location.href = url;
}
});
var indexpage = "";
if(!indexpage)
{
$('.global_box').hide();
$('.global_nav').mouseover(function(){
$('.global_box').show();
}).mouseout(function(){
$('.global_box').hide();
});
}
});
function hoverCssChange()
{
//指向样式
$(".bor_bag").mouseover(function(){
$(this).css({"background":"#fff","border-left":"1px solid #e6e5e5","border-right":"1px solid #e6e5e5"});
$(this).children(".web_nav_ico").css("background","#fff")
});
$(".bor_bag").mouseout(function(){
$(this).css({"background":"none","border-left":"1px solid #f1f1f1","border-right":"1px solid #f1f1f1"});
$(this).children(".web_nav_ico").css("background","#f1f1f1");
})
}
jQuery.fn.addFavorite = function(l, h) {
return this.click(function() {
var t = jQuery(this);
if(jQuery.browser.msie) {
window.external.addFavorite(h, l);
} else if (jQuery.browser.mozilla || jQuery.browser.opera) {
t.attr("rel", "sidebar");
t.attr("title", l);
t.attr("href", h);
} else {
alert("请使用Ctrl+D将本页加入收藏夹!");
}
});
};