﻿

$("document").ready(function(){
	$(".nav > li").hover(function(){
		$(this).addClass("on");
	    $(this).children("div").stop(true,true).slideDown("fast");
	},function(){
	    $(this).removeClass("on");
		$(this).children("div").stop(true,true).slideUp("fast");
	})
    $("#navChild a:last-child ").css("border-bottom","none") 
    
    
    
	var pgname = document.location.href;
		  pgname=pgname.replace(/\?.*$/,'')
		  pgname=pgname.replace(/^.*\//,'')
	if(pgname=="index.asp"||pgname=="index.asp#"||pgname==null||pgname==""){
		$(".banner").css("height","400px");
		$(".bann").css("height","400px");
	}
	
	$(".ProClaList a:last-child").css("background","none");
	$(".proListPic ul li>a").hover(function(){
			$(this).find(".picHover").stop(true,true).fadeIn("fast");
		},function(){
			$(this).find(".picHover").stop(true,true).fadeOut("fast");
	});
	
   $(".proListPic li:nth-child(3n)").css("margin-right","0px"); 
	
	
   $(".btnavlist a:last-child").css("padding-right","0px"); 
   $(".btnavlist a:first-child").css("padding-left","0px"); 
  
  $(".leftProClaList > li ").click(function(){
	  $(this).next("ul").slideToggle();
	  $(this).toggleClass("open");
  }); 
//$(".leftProClaList > li ").hover(function(){
//	  $(this).toggleClass("on");
//});
//$(".leftProClaList > ul > li ").hover(function(){
//	  $(this).toggleClass("on");
//});  
    $('.codepic').hover(function(){$('.code').fadeIn()},function(){$('.code').fadeOut()});
	$('.backup').click(function(){
		$('body,html').animate({scrollTop:0},500)
	});
//	$(".backup").hide();
//	$(function() {
//		$(window).scroll(function(){
//			if ($(window).scrollTop()>500){
//				$(".backup").fadeIn(1000);
//			}else{
//				$(".backup").fadeOut(1000);
//			}
//		});
//	});
/* end index  jq  */
    
   $(".pic1:nth-child(3n)").css("margin-right","0");
   $(".mainConList .pic1  a").hover(function(){
			$(this).find(".pic1Hover").stop(true,true).fadeIn("slow");
		},function(){
			$(this).find(".pic1Hover").stop(true,true).fadeOut("slow");
	});
	
   $(".pic2:last-child a").css("border-bottom","none");
 //  $(".mainConList ul li:last-child").css("border-bottom","none");
   	$(".pglist ul li").not(".on").not(".last").not(".next").hover(function(){ $(this).addClass("on");},function(){$(this).removeClass("on");})
	$(".pglist ul li.last").hover(function(){
		  $(this).css({background:"url(images/lastBg2.jpg) 6px center no-repeat #c3c3c3",border:"1px solid #c3c3c3"}).find("a").css({color:"#fff"});
	 },function(){
		   $(this).css({background:"url(images/lastBg.jpg) 6px center no-repeat #f4f4f4",border:"1px solid #dadada"}).find("a").css({color:"#787878"});
	 })
	$(".pglist ul li.next").hover(function(){
		  $(this).css({background:"url(images/nextBg2.jpg) 56px center no-repeat #c3c3c3",border:"1px solid #c3c3c3"}).find("a").css({color:"#fff"});
	 },function(){
		   $(this).css({background:"url(images/nextBg.jpg) 56px center no-repeat #f4f4f4",border:"1px solid #dadada"}).find("a").css({color:"#787878"});
	 })
	$(".pglist ul li.font").hover(function(){ $(this).css({background:"#f4f4f4",color:"#787878",border:"none"});})
  
});
//导航定位
$("document").ready(function(){
	//case
	var page=1;
	var i=1;
	var box=$('.slides');
	var n=$('.proListPic ul').length;
	var h=$('.proListPic').width();
	
	var pagetotal=Math.ceil(n/i);
	
	$('.picleftpro').bind('click',upwardsfn);
	$('.picrightpro').bind('click',downfn);	
	function upwardsfn(){
		if(page>1){
			box.animate({ marginLeft : '+='+h }, "slow");
			page--;
			$(".picrightpro").css("background","#0b59aa");	
			if(page<=1){
				$('.picleftpro').css("background","#106cca");	
			}else{
				$('.picleftpro').css("background","#0b59aa");	
			}
		}
	}
	function downfn(){
		if(pagetotal>page){
			box.animate({ marginLeft : '-='+h }, "slow");
			page++;
			$(".picleftpro").css("background","#0b59aa");	
			if(page>=pagetotal){
				$('.picrightpro').css("background","#106cca");	
			}else{
				$('.picrightpro').css("background","#0b59aa");	
			}
		}
	}
});
