$(document).ready(function(){
/*广告*/
if ($("#headerBanner").length>0)
{
$("#headerBanner").Xslider_full({
speed: 1200,
space: 4000,
auto: true, //自动滚动
affect:'fade',
ctag: '.pic'
})
}
if ($("#playBanner").length>0)
{
$("#playBanner").Xslider({
speed: 1200,
space: 3000,
auto: true, //自动滚动
affect:'fade',
ctag: 'div'
});
}
$("#menu li").hover(
function(){
var index = $("#menu li").index(this)+1;
$(this).children('div').slideDown("fast");
$(this).addClass('change');
},
function(){
var index = $("#menu li").index(this)+1;
$(this).children('div').slideUp("fast");
$(this).removeClass('change');
}
);
$('#NoticeTab').Tab("li",".change",".Tab_nr","mouseenter")
$('#NoticeTab2').Tab("li",".change",".Tab_nr","mouseenter")
$('#NoticeTab3').Tab("li",".change",".Tab_nr","mouseenter")
$('#NoticeTab4').Tab("li",".change",".Tab_nr","mouseenter")
//$("#ADList").jcarousellite_gundong({btn:1,list:".imgList li","visible":3,"auto":5000,"speed":300})
//$("#GuideFenlei").jcarousellite_gundong({btn:1,list:".fenleiList li","visible":11,"auto":false,"speed":100,vertical: true,btnPrev:"#GuideFenlei .move_left",btnNext:"#GuideFenlei .move_right", circular:false})
if ($(".scrolltop").length>0)
{
$('.scrolltop').find(".tablestyle").wrap("
").parent().wrapAll("");
$(".scrolltop").imgscroll({
speed: 60, //图片滚动速度
amount: 0, //图片滚动过渡时间
width: 1, //图片滚动步数
dir: "up" // "left" 或 "up" 向左或向上滚动
});
}
$("#quickFn .box2 li").bind('mouseenter',function(){
var self=$(this).find(".iconlist");
time_delay=setTimeout(function(){
if(!self.is(":animated"))
{
self.addClass("star_animate");
self.stop(true,false).animate({"margin-right":"15px"}, 300);
}
},100)
}).bind('mouseleave',function(){
clearTimeout(time_delay)
var self=$(this).find(".iconlist")
if (self.is(".star_animate"))
{
self.removeClass("star_animate");
self.stop(true,false).animate({"margin-right":"52px"}, 300);
}
})
//$('#Inquiry .text').placeholder({isUseSpan:true});
})
//滚动
$.fn.jcarousellite_gundong=function(options ){
var self=$(this);
if (self.length==0) return false;
var items=options.list,config;
if (self.find(items).length<=options.visible) return false;
self.css("overflow","visible");
if (self.find(items).is("div"))
{
self.find(items).wrap("");
self.find(items).parent().wrapAll("");
items=".templist li"
}
self.find(items).parent().wrapAll('').parent().wrapAll('');
if (options.btn!=0)
{
self.find(".gundong").append(' ')
}
self.find(".gundong").each(function(index){
config={
btnPrev: $(this).find(".move_left:eq("+index+")"),
btnNext: $(this).find(".move_right:eq("+index+")"),
visible:1,
auto: 2500 ,
speed: 300
}
if (options.btn==0)
{
$.extend(config, {btnPrev:null,btnNext:null});
}
$.extend(config, options);
$(this).find(".jCarouselLite:eq("+index+")").jCarouselLite(config);
})
}
//选项卡切换
$.fn.Tab=function(subtab,selectname,tab,action){
var self=$(this);
var select_=0;
var addselectname=selectname.replace(".","")
if (self.find(subtab).length==0) return false;
if (self.find(subtab+selectname).length==0)
{self.find(subtab+":eq(0)").addClass(addselectname);}
self.find(subtab).each(function(index, element) {
if (!$(this).is(selectname))
{
self.parent().find(tab+":eq("+index+")").hide();
}
});
self.find(subtab).bind(action,function(){
self.find(subtab+selectname).removeClass(addselectname);
$(this).addClass(addselectname);
var index=$(this).index();
self.siblings(tab).hide()
self.siblings(tab+":eq("+index+")").show();
})
}