jQuery(document).ready(function(){
    jQuery("#navMenu ul li").each(function(){
        jQuery(this).mouseover(function(){
            changeShow(jQuery(this).find("a")[0].id);
        }).mouseout(function(){
            hideNavArea
        });
    });
    
   jQuery("body").bind("click",
function (){
hideNavArea();
}
); 
    
   jQuery("#cms_nav_94 .mulit-column ul li .showSubtitle").each( function(){
     var txt = jQuery(this).text();
	 var href = jQuery(this).prev().find("a").attr("href");
	 jQuery(this).children().bind("click",function(){
	   window.open(href);
	 }) 
   });

});

var i = 0, y = 1, len = 0;
//上下滚动
function changeViewUp(){
	var pics = jQuery(".panel .image_block");
    jQuery("#scroll_up li").each(function(){
        jQuery(this).click(function(){
			jQuery(".panel .image_block").hide();
            var index = jQuery(this).index();
            pics[index].style.display="block";
			i=index;
			whitePos((i % 4 + 1));
        });
    });
	jQuery(".sprev").click(function(){
		jQuery(".panel .image_block").hide();
		jQuery(".filmstrip .items").animate({
            top: '0'
        }, "slow");
		jQuery(".white_arrow").css("top", 54);
		pics[4].style.display="block";
		i=0;
	});
	jQuery(".snext").click(function(){
		jQuery(".panel .image_block").hide();
		jQuery(".filmstrip .items").animate({
            top: '-330px'
        }, "slow");
		jQuery(".white_arrow").css("top", 54);
		pics[0].style.display="block";
		i=4;
	});
    var pic_s = jQuery(".panel .image_block");
    jQuery(".panel .image_block")[0].style.display = "block";
    len = pic_s.length;
    //自动播放
    setInterval(autoPlay, 3000);
};




//导航事件
function changeShow(tag){
    hideNavArea();
    switch (tag) {
        case "car":
            jQuery("#nav-car").show();
            break;
        case "news":
            jQuery("#dropmenu1").show();
            break;
        case "action":
            jQuery("#dropmenu2").show();
            break;
        case "sell":
            jQuery("#dropmenu3").show();
            break;
        case "market":
            jQuery("#dropmenu4").show();
            break;
        case "act":
            jQuery("#dropmenu5").show();
            break;
    }
    
};
//隐藏导航区域
function hideNavArea(){
    jQuery("#nav-car").hide();
    jQuery(".dropMenu").hide();
	
};





