// JavaScript Document
var ImgSrc=new Array("1.jpg","2.jpg","3.jpg","4.jpg","5.jpg","6.jpg","7.jpg");
var ImgSrcMouse=new Array("1-1.jpg","2-1.jpg","3-1.jpg","4-1.jpg","5-1.jpg","6-1.jpg","7-1.jpg");

$(function(){
	$(".MoveNav").mouseover(function(){
		$(this).attr("src","images/"+ImgSrcMouse[$(this).attr("NavId")]);	
	});
	$(".MoveNav").mouseout(function(){
		$(this).attr("src","images/"+ImgSrc[$(this).attr("NavId")]);
	});
	$(".MoveNav").click(function(){
		location.href=$(this).attr("url");
	})
	
	//二级分类
	$(".ClickNavMin").click(function() {
		$(this).parent().find(".MinNi").slideDown('fast').show();
		$(this).parent().click(function(){  
				$(this).siblings().find(".MinNi").slideUp('slow');   
		});
	});
	
	//图片查看
	$("#MoveImgSrc").click(function(){
		$(".Windows").css({
				  "width":$(document).width(),
				  "height":$(document).height()
		}).fadeIn("slow",function(){
				  $(this).css({"filter":"alpha(opacity=50)","opacity":"0.5"});
		});
		var img=new Image()
		img.src=$("#MoveImgSrc").attr("src");
		$(".ImgBox").css({
				 "width":img.width,
				 "height":img.height,
				 "left":$(document).width()/2-img.width/2,
				 "top":$(document).height()	/2-img.height/2
		}).fadeIn("slow",function(){
				 $(".Button").slideDown("slow");
				 $(".ImgSrc").html("<img src=\""+$("#MoveImgSrc").attr("src")+"\">");
		});
	});
	$(".ImgBoxClose").click(function(){
			$(".Windows").fadeOut("slow").css("display","none");
			$(".ImgBox").fadeOut("slow").css("display","none");
			$(".Button").fadeOut("slow").css("display","none")
	});
})
