$(function(){ $('.flicker-example').flicker();});


jQuery(".fdiv_news_scorll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:true,vis:7,trigger:"click"});
jQuery(".fdiv_product_scorll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"left",autoPlay:true,vis:4,trigger:"click"});
jQuery(".profdj").slide({ mainCell:".bd ul",effect:"left",autoPlay:true });
// 内页切换
 $('.pronytit li:nth-child(1)').click(function(){ 
         $('.pronycon .pronyconli:nth-child(1)').show();
         $('.pronycon .pronyconli:nth-child(2)').hide();
         $( this ).addClass( "on" )
         $( this ).siblings("li").removeClass( "on" )
    }) 
 $('.pronytit li:nth-child(2)').click(function(){ 
         $('.pronycon .pronyconli:nth-child(2)').show();
         $('.pronycon .pronyconli:nth-child(1)').hide();
         $( this ).addClass( "on" )
         $( this ).siblings("li").removeClass( "on" )
    }) 





jQuery(".anliscroll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"top",autoPlay:false,vis:1,trigger:"click"});
jQuery(".yscroll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"left",autoPlay:true,vis:1,trigger:"click"});
jQuery(".casescroll").slide({titCell:".hd ul",mainCell:".bd ul",autoPage:true,effect:"left",autoPlay:true,vis:1,trigger:"click"});




function fajjz() {
    var a = $(".profdj .hd li").width();
    var b = parseInt($(".profdj .hd li").css("margin-right"));
    var c = $(".profdj .hd li").length;
    $(".profdj .hd ").css("width", (a + b) * c)
}
fajjz();


function nydh() {
    var sumWidth=0;
    $(".Institle  li.Institle_li").each(function(){
        sumWidth += $(this).width();
    });
    var b = parseInt($(".Institle  li.Institle_li").css("margin-right"));
     var c = $(".Institle  li.Institle_li").length;
    var a= sumWidth;
    $(".Institle ul:nth-child(1)").css("width", a + b * c+2)


}
nydh();















// 导航加色块
var sitename1=$(".crumb p a:eq(2)").html();         
$(".Institle_li h5 a").each(function() {                         
var menuname1=$(this).html();                                   
var menuname2=$.trim(menuname1);                                                       
if(sitename1==menuname2){                                                                   
$(this).addClass("on");                                                                                                                                                                                                                                        
}                   
});                         



var nav1=$(".crumb p a:eq(2)").html();         
$(".ny_news_title li a").each(function() {                         
var nav2=$(this).html();                                   
var nav3=$.trim(nav2);                                                       
if(nav1==nav3){                                                                   
$(this).addClass("on");                                                                                                                                                                                                                                        
}                   
});  


            
var sit1=$(".crumb p a:eq(1)").html();         
$(".nav li a").each(function() {  
var me3=$(this).html();                 
var me4=$.trim(me3);            
if(sit1==me4){          
$(this).addClass("first");        
}       });          
var sit11=$(".crumb p a:eq(2)").html();         
$(".nav li a").each(function() {  
var me33=$(this).html();                 
var me44=$.trim(me33);            
if(sit11==me44){          
$(this).addClass("first");
$(this).parents("li").siblings("li").children("a").removeClass("first");
}    
});     


    $(".yb_conct").hover(function() {
        $(".yb_conct").css("right", "5px");
        $(".yb_bar .yb_ercode").css('height', '200px');
    }, function() {
        $(".yb_conct").css("right", "-127px");
        $(".yb_bar .yb_ercode").css('height', '53px');
    });

    $(".yb_top").click(function() {
        $("html,body").animate({
            'scrollTop': '0px'
        }, 300)
    });
