

$(document).ready(function(){
 $(".parent").mouseenter(function(){$(this).find("ul").css({display:"block",zIndex:"10"})})
 $(".parent").mouseleave(function(){$(this).find("ul").css({display:"none",zIndex:"9"})})

 $(".dis").fadeTo(0,0)
 $(".box").mouseenter(function(){$(this).find(".dis").stop().fadeTo("normal",1);})
 $(".box").mouseleave(function(){$(this).find(".dis").stop().fadeTo("normal",0);})

 // TABS
 data=$(".data").eq(0).html();
 $("#tabContents").html(data)
 $(".tab").click(function(){
   $(".tab").attr("id","")
   $(this).attr("id","selected")
   data=$(this).find(".data").html();
   $("#tabContents").html(data)
 })
 // main Slider
  speed=820;
  steperx=0;
  counter=0;
  SlideNum=$("#leader a .box").length;
  clickPOSS=SlideNum/5;
   $("#next").click(function(){
     counter++
     if (counter<clickPOSS){
     steperx-=710

     $("#leader").animate({marginLeft:steperx+"px"},speed);
     }else{
      counter--;
      $("#leader").animate({marginLeft:"-=30px"},speed);
      $("#leader").animate({marginLeft:"+=30px"},speed);
     }
   })
   $("#prev").click(function(){
     counter--
     if (counter>=0){
     steperx+=710
     $("#leader").animate({marginLeft:steperx+"px"},speed);
     }else{
      counter++;
     }
   })

  //-------
 // product Slider
  speed2=820;
  steperx2=0;
  counter2=0;
  SlideNum2=$("#thumbLeader .thumb").length;
  clickPOSS2=SlideNum2/3;
   $("#keyDown").click(function(){
     counter2++
     if (counter2<clickPOSS2)
     { 
         steperx2-=189;
         $("#thumbLeader").animate({marginTop:steperx2+"px"},speed2);
     }
     else{ counter2--; }
   })
   $("#keyUp").click(function(){
     counter2--
     if (counter2>=0)
     {
         steperx2+=189;
         $("#thumbLeader").animate({marginTop:steperx2+"px"},speed2);
     }
     else{ counter2++; }
   })
})

