	var	mod = 0,slide_num = 0,cur_slide = 0;
	var slide_per_once = 3;
$(document).ready( function(){
	$("#menu li.first").hover(
			function () {
				$("#menu li").stop();
				$(this).next("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).next("li").next("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).animate({
					width: "960px"
					}, 500 ,function(){$(this).children(".drop-content").slideDown("slow");});


			},
			function () {
				$("#menu li").stop();
				$(this).children(".drop-content").slideUp("fast");
				$(this).next("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).next("li").next("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).animate({
					width: "302px"
					}, 500 );
			}
	);
	$("#menu li.second").hover(
			function () {
				$("#menu li").stop();
				$(this).next("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).prev("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).animate({
					width: "960px"
					}, 500 ,function(){$(this).children(".drop-content").slideDown("slow");});

			},
			function () {
				$("#menu li").stop();
				$(this).children(".drop-content").slideUp("fast");
				$(this).next("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).prev("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).animate({
					width: "302px"
					}, 500 );
			}
	);
		$("#menu li.third").hover(
			function () {
				$("#menu li").stop();
				$(this).prev("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).prev("li").prev("li").animate({
					paddingLeft: "0px",
					width: "0px"
					}, 500 );
				$(this).animate({
					width: "960px"
					}, 500 ,function(){$(this).children(".drop-content").slideDown("slow");});

			},
			function () {
				$("#menu li").stop();
				$(this).children(".drop-content").slideUp("fast");
				$(this).prev("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).prev("li").prev("li").animate({
					paddingLeft: "18px",
					width: "302px"
					}, 500 );
				$(this).animate({
					width: "302px"
					}, 500 );
			}
	);

/*	$("ul.img").width(($("ul.img li").size()*$("ul.img li").width()));
	$("div.slider-right").hover(
			function () {
			if( $("ul.img").css("left") !=="0px"){
					$(this).children("a").css("display","block");
				}
				else{
					$(this).children("a").css("display","none");
					}
			},
			function () {
				$(this).children("a").css("display","none");
			}
	);
	$("div.slider-left").hover(
			function () {
			if( ($("ul.img li").size()-slide_per_once)*$("ul.img li").width()*(-1)+"px" !== $("ul.img").css("left")){
					$(this).children("a").css("display","block");
				}
				else{
					$(this).children("a").css("display","none");
				}
			},
			function () {
				$(this).children("a").css("display","none");
			}
	);
	$("div.slider-right").click(function () {
    slider_move(1);
	if( $("ul.img").css("left") == 	(-1)*$("ul.img li").width()+"px"){
		$(this).children("a").css("display","none");
	}	
    });
	$("div.slider-left").click(function () {
      slider_move(0);
		if( ($("ul.img li").size()-slide_per_once-1)*$("ul.img li").width()*(-1)+"px" == $("ul.img").css("left")){
			$(this).children("a").css("display","none");
		}
    });
    */
});


	function slider_move(mod){
		if(mod == 1){
			if(cur_slide <  $("ul.img li").size()-slide_per_once-2){
				cur_slide++;
				$("ul.img").animate({left:cur_slide*($("ul.img li").width())},1000)	;
			}
		}
		else{

			if(cur_slide >  $("ul.img li").size()*(-1)+slide_per_once){
				cur_slide--;
				$("ul.img").animate({left:cur_slide*($("ul.img li").width())},1000)	;

			}
		}
	}