锘?*public*/
/*public*/
/*ea_h*/
/*xn_mc_index_3_wrap*/
//寰晢鐢?0160621
$ && $(function () {
if ($("#EIMS_C_50055_Panel").length > 0) {
EIMS_C_50055.Init();
}
});
var EIMS_C_50055 = {
Config: {
SerarchPage: "/m/search.aspx", //鎼滅储缁撴灉椤甸潰
AllHotItem: null,
HotItemIndex: 0
},
Init: function () {
EIMS_C_50055.RefreshSearchHistory();
EIMS_C_50055.Config.AllHotItem = $('.EIMS_C_50055_HotSearch a');
$("#EIMS_C_50055_GoSearch").on("click", function () {
var key = $("#EIMS_C_50055_SearchInput").val().trim();
if (!key) {
return;
}
var keyList = localStorage.getItem("KeyList");
if (!keyList) {
localStorage.setItem("KeyList", [key]);
} else if (keyList.split(',').indexOf(key) < 0) {
localStorage.setItem("KeyList", keyList + "," + key);
}
window.location.href = MergeUrlParas(EIMS_C_50055.Config.SerarchPage, false, ["key"], [key]);
});
//娓呴櫎鎼滅储鍘嗗彶
$("#EIMS_C_50055_ClearHistory").on("click", function (ev) {
localStorage.removeItem("KeyList");
EIMS_C_50055.RefreshSearchHistory();
});
$(".EIMS_C_50055_HotSearch").show();
EIMS_C_50055.Config.HotItemIndex = 0;//鍏跺疄绱㈠紩 浠?寮€濮
EIMS_C_50055.InitHotItem();
$("#EIMS_C_50055_HotRefresh").click(function () {
EIMS_C_50055.InitHotItem();
});
$(".EIMS_C_50055_HotSearch").on("click", "a", function() {
window.location.href = MergeUrlParas(EIMS_C_50055.Config.SerarchPage, false, ["keyword"], [$(this).text()]);
});
$("#EIMS_C_50055_HistorySearch").on("click", "li", function () {
window.location.href = MergeUrlParas(EIMS_C_50055.Config.SerarchPage, false, ["keyword"], [$(this).text()]);
});
},
InitHotItem: function () {
if (EIMS_C_50055.Config.AllHotItem.length <= 4) {
return false;
}
$('.EIMS_C_50055_HotSearch a').remove(); //娓呴櫎鎵€鏈
var nextEnd = EIMS_C_50055.Config.HotItemIndex + 7;//涓嬩竴椤垫暟鎹潯鏁
var isAppend = false;
for (var i = EIMS_C_50055.Config.HotItemIndex; i <= nextEnd; i++) {
if (i >= EIMS_C_50055.Config.AllHotItem.length) {//濡傛灉鏁版嵁鏉℃暟涓嶅浠庡ご寮€濮嬪皢鍏冪礌鎯冲悗杩藉姞
EIMS_C_50055.Config.HotItemIndex = 0;
nextEnd = 0;
isAppend = true;
}
if (isAppend) {//鏄惁闇€瑕佽ˉ鍏呮暟鎹
var currentLength = $('.EIMS_C_50055_HotSearch a').length; //褰撳墠鏈夊灏戜釜鐑悳璇
for (var j = 0; j < 4 - currentLength; j++) {//琛ュ厖缂哄皯鐨勭儹鎼滆瘝
$('.EIMS_C_50055_HotSearch').append(EIMS_C_50055.Config.AllHotItem.eq(j));
}
} else {
$('.EIMS_C_50055_HotSearch').append(EIMS_C_50055.Config.AllHotItem.eq(i));
}
}
EIMS_C_50055.Config.HotItemIndex = nextEnd;//涓嬩竴娆$殑璧峰绱㈠紩
},
//鑾峰彇鍘嗗彶鎼滅储鍏抽敭璇
RefreshSearchHistory: function () {
var keyList = localStorage.getItem("KeyList");
if (!keyList) {
$("#EIMS_C_50055_HistorySearchDiv").hide();
return;
}
var innerHtml = "";
keyList.split(',').forEach(function (item) {
innerHtml += '
' + item + '';
});
$("#EIMS_C_50055_HistorySearch").html(innerHtml);
$("#EIMS_C_50055_HistorySearchDiv").show();
},
//鍒犻櫎鎸囧畾鍘嗗彶鍏抽敭璇
DeleteKey: function (key, obj) {
var keylist = localStorage.getItem("KeyList");
if (keylist) {
var arr = keylist.split(',').filter(function (item) {
return item != key;
});
localStorage.setItem("KeyList", arr);
$(obj).parent().remove();
}
}
};
$(function(){
$(".xn_mc_index_3_sousuo").click(function(){
$("#EIMS_C_50055_Panel").toggle();
})
});
/*end_xn_mc_index_3_wrap*/
/*ea_h*/
/*ea_n*/
/*xn_mn_2_wrap*/
$(function(){
if ($('#xn_mn_2_wrap').length>0) {
var isShow = true;
var speed = 400;
var xn_nav = $('.xn_mn_2_nav');
var xn_nav_box = xn_nav.children('.xn_mn_2_box');
var xn_nav_ul = xn_nav.children('ul');
var xn_nav_bg = $("html,body").children('form');
var xn_nav_bg_width = xn_nav_ul.outerWidth(true);
xn_nav_ul.height($(document).height());
// xn_nav_ul.hide();
xn_nav_box.click(function() {
$(this).toggleClass('xn_mn_2_box_curr');
// xn_nav_ul.stop().slideToggle(400);
});
// xn_nav_box.click(function() {
// // xn_nav.css('overflow', 'visible');
// // xn_nav_ul.stop().animate({left: 0}, 400);
// $(".xn_mn_2_nav").append('');
// if(isShow){
// xn_nav.css('overflow', 'visible');
// xn_nav_bg.css('overflow', 'visible');
// // xn_nav_ul.css('box-shadow','0px 0px 16px 6px #d0d0d0');
// // xn_nav_ul.css('left',0);
// xn_nav_ul.stop().animate({"left": 0,"box-shadow": "0px 0px 16px 6px #d0d0d0",},speed);
// xn_nav_bg.stop().animate({"left": xn_nav_bg_width +"px"},speed,function(){
// isShow = false;
// });
// }else{
// xn_nav.css('overflow', 'hidden');
// xn_nav_bg.css('overflow', 'hidden');
// // xn_nav_ul.css('box-shadow','none');
// // xn_nav_ul.css('left','-29.8%');
// xn_nav_ul.stop().animate({"left": "-29.8%","box-shadow": "none",},speed);
// xn_nav_bg.stop().animate({"left":0},speed,function(){
// isShow = true;
// });
// }
// });
$(".xn_mn_2_nav").append('');
xn_nav_box.click(function() {
xn_nav.css('overflow', 'visible');
xn_nav_bg.css('overflow', 'visible');
$(".xn_mn_2_box_close").css('display', 'block');
xn_nav_ul.css('box-shadow','0px 0px 16px 6px #333');
xn_nav_ul.stop().animate({"left": 0},speed);
xn_nav_bg.stop().animate({"left": xn_nav_bg_width +"px"},speed);
});
$(".xn_mn_2_box_close").click(function() {
xn_nav.css('overflow', 'hidden');
xn_nav_bg.css('overflow', 'hidden');
$(".xn_mn_2_box_close").css('display', 'none');
xn_nav_ul.css('box-shadow','none');
xn_nav_ul.stop().animate({"left": "-85%"},speed);
xn_nav_bg.stop().animate({"left":0},speed);
});
}
})
/*end_xn_mn_2_wrap*/
/*ea_n*/
/*ea_ba*/
/*xn_index_mba_1_wrap*/
var IsFast=true;
var isAutoPlay = true;
var banner=function(){
if($("#xn_index_mba_1_wrap").length > 0){
var $wrap = $("#xn_index_mba_1_wrap");
var $main = $(".xn_index_mba_1_main");
var $ul = $(".xn_index_mba_1_ul");
var $li = $ul.children("li");
var $lights = $(".xn_index_mba_1_lights");
var speed =300;
var $curr_class = "xn_index_mba_1_lightsCurr";
var timeInterval = 3000;
$li.css("width",parseInt($main.outerWidth(true)));
$ul.css("width",$li.length * $li.outerWidth(true));
$lights.html("");
$li.each(function(){
$lights.append("");
$(this).attr("lights",$(this).index());
});
var idx;
var size = $li.size();
//鐐瑰嚮鐒︾偣鍥惧垏鎹細
$lights.children().first().addClass($curr_class);
$lights.children("span").click(function(){
var index = $(this).index();
idx = parseInt($ul.children().first().attr("lights"));
var num = index-idx;
num = num>0?num:num+size;
for(var i = 0;i < num ;i++){
$ul.append($ul.children().first());
}
$ul.stop().animate({"left":0},speed);
idx = $ul.children().first().attr("lights");
$lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
//$ul.animate({"left":-index*$li.outerWidth(true)},speed);
//$(this).addClass($curr_class).siblings().removeClass($curr_class);
});
//宸﹀彸鍒囨崲锛
function nextImg(){
$ul.stop().animate({left:"-"+$li.outerWidth(true) +"px"},speed,function(){
$ul.append($ul.children().first());
$ul.css("left",0);
idx = $ul.children().first().attr("lights");
$lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
return idx;
});
}
function prevImg(){
$ul.css('left',-$li.outerWidth(true));
$ul.prepend($ul.children().last());
$ul.stop().animate({"left":0},speed);
idx = $ul.children().first().attr("lights");
$lights.children().eq(idx).addClass($curr_class).siblings().removeClass($curr_class);
}
if(IsFast){
IsFast=false;
var auto = setInterval(function(){
if(isAutoPlay){
nextImg();
}
},timeInterval);
}
$ul.mouseover(function(){
clearInterval(auto);
});
$ul.mouseleave(function(){
IsFast=false;
auto = setInterval(function(){
if(isAutoPlay){
nextImg();
}
},timeInterval);
});
var dragDistance = 80 ;
var dragY = 20;
}
}
$(function(){
banner();
$(window).resize(function(){ banner();})
});
/*end_xn_index_mba_1_wrap*/
/*ea_ba*/
/*ea_c*/
/*xn_mc_index_1_wrap*/
function setImageindex1(){
var img_height=$('.xn_mc_index_1_conten img:eq(0)').height();
$('.xn_mc_index_1_conten img').each(function(){
$(this).parent().height(img_height);
});
$('.xn_mc_index_1_conten img').unbind('load').bind('load',function(){
setTimeout(function() {
var img_height=$('.xn_mc_index_1_conten img:eq(0)').height();
$('.xn_mc_index_1_conten img').each(function(){
$(this).parent().height(img_height);
});
}, 1000);
});
}
$(function(){
if($("#xn_mc_index_1_wrap").length > 0){
setImageindex1();
$(window).resize(function(){ setImageindex1();})
}
});
/*end_xn_mc_index_1_wrap*/
/*xn_mc_svv_7_wrap*/
function setImagenewsv3(){
var img_height=$('.xn_mc_svv_7_li img:eq(0)').height();
$('.xn_mc_svv_7_li img').each(function(){
$(this).parent().height(img_height);
});
$('.xn_mc_svv_7_li img').unbind('load').bind('load',function(){
setTimeout(function() {
var img_height=$('.xn_mc_svv_7_li img:eq(0)').height();
$('.xn_mc_svv_7_li img').each(function(){
$(this).height(img_height);
});
}, 1000);
});
}
$(function(){
if($("#xn_mc_svv_7_wrap").length > 0){
setImagenewsv3();
$(window).resize(function(){ setImagenewsv3();})
}
});
$(function(){
if ($("#xn_mc_svv_7_wrap").length>0) {
var oWrapDiv=$("#xn_mc_svv_7_wrap");
var oRollBox=$("#xn_mc_svv_7_ul");
var oRollBox_li=oRollBox.children("li");
var iRollBox_li_length=oRollBox_li.length;
var iRollBox_li_width=oRollBox_li.outerWidth(true);
var iRollBox_li_width2=oRollBox_li.width();
oRollBox_li.width(iRollBox_li_width2);
var speed=500;
var iNumber=1;//姣忓睆婊氬姩涓暟
var oControl=$("#xn_mc_svv_7_control");
var iCont=Math.ceil(iRollBox_li_length/iNumber);//鐒︾偣鐨勪釜鏁
var oConcurr="xn_mc_svv_7_concurr";
var isOff=true;//鏄惁寮€鍚嚜鍔ㄦ粴鍔
var ifreetime=2000;//鑷姩婊氬姩鏃堕棿闂撮殧
var timer=null;
var _this=0;
oRollBox.width(iRollBox_li_length*iRollBox_li_width).css("position","relative");
oRollBox_li.each(function(){
$(this).attr("index",$(this).index());
});
for (var j = 0; j < iCont; j++) {
oControl.append("");
};
var oCon_span=oControl.children("span");
oCon_span.first().addClass(oConcurr);
var iMovew=iRollBox_li_width*iNumber;
var keys=-1;
oCon_span.click(function(){
_this=$(this).index();
keys=_this;
$(this).addClass(oConcurr).siblings().removeClass(oConcurr);
oRollBox.stop().animate({left:-_this*iMovew},speed);
});
function oAutoScroll(){
timer=setInterval(function(){
keys+=1;
if (keys>oCon_span.length) {
keys=0;
};
oCon_span.eq(keys).click();
},ifreetime);
}
if (isOff) {
oAutoScroll();
oWrapDiv.hover(function(){
clearInterval(timer);
},function(){
oAutoScroll();
})
};
};
});
/*end_xn_mc_svv_7_wrap*/
/*xn_mc_index_14_wrap*/
/*end_xn_mc_index_14_wrap*/
/*xn_mc_index_10_wrap*/
/*end_xn_mc_index_10_wrap*/
/*xn_mc_index_2_wrap*/
/*end_xn_mc_index_2_wrap*/
/*ea_c*/
/*ea_b*/
/*xn_mb_1_wrap*/
/*end_xn_mb_1_wrap*/
/*ea_b*/
/*ea_bg*/
/*ea_bg*/
/*ea_sh*/
/*ea_sh*/
/*ea_mu*/
/*xn_mu_1_wrap*/
/*end_xn_mu_1_wrap*/
/*ea_mu*/