/* =Sub Navigation
--------------------------------------------------------------------------------------------------------*/
$(document).ready(function(){

$(".productListView a").hover(function(){
		$(this).find('span').stop().animate({'bottom':'17px', opacity:'1'}, 500);
	},function(){
		$(this).find('span').stop().animate({'bottom':'10px', opacity:'0'}, 500);
	});


});


$(document).ready(function(){
 
	$(".productListView a.galleryView").click(function(){
		 $(".productListView li").removeClass("active"); 
	 	 $(this).parent().addClass("active"); 
		 
		  if ( $.browser.msie ) {
			$("ul.productList").hide(1,function(){
				 $(this).show().removeClass("listViewBlock"); 
			});
		 } else {
			$("ul.productList").animate({opacity:'0.1'}, 500, function(){
				 $(this).animate({opacity:'1'}, 500).removeClass("listViewBlock"); 
			});
		 }

		 
		 
	  
	  });
	  
	  $(".productListView a.listView").click(function(){
		 $(".productListView li").removeClass("active"); 
	 	 $(this).parent().addClass("active"); 
		 
		 
		 if ( $.browser.msie ) {
			$("ul.productList").hide(1,function(){
				 $(this).show().addClass("listViewBlock"); 
			});
		 } else {
			 $("ul.productList").animate({opacity:'0.1'}, 500, function(){
			 $(this).animate({opacity:'1'}, 500).addClass("listViewBlock"); 
			});
		 }
		 
		 
		
	  
	  });
	  
	  $(".send").hover(function(){
		 	$(this).addClass("sendhover");
		}, function (){
			$(this).removeClass("sendhover");
		});
	  
	  $(".send").mousedown(function(){
		$(this).addClass("send-active");
	});
	$(".send").mouseup(function(){
		$(this).removeClass("send-active");
	});
	    

});


$(function(){
	$(".box").eq("0").addClass('firstbox');
	$(".box").eq("4").addClass('firstbox');
	$(".box").hover(function(){
		$(this).addClass('boxActive');
	},function(){
		$(this).removeClass('boxActive');	
	})
});

$(function(){
 
 function bodySetWidth (){
 
   var bodyWidth =  $(window).width();
   if(bodyWidth<960){
    $('body').addClass('bodyWidth'); 
   }else {
    $('body').removeClass('bodyWidth'); 
   }
 }
 
 
 $(".productList li").hover(function(){
		$(this).addClass('lihover');
	},function(){
		$(this).removeClass('lihover');	
	})
 
 bodySetWidth ();
  $(window).resize(function() {
    bodySetWidth ();
	productBox();
  });
  
  setTimeout(function () {
 	 productBox()
  },200);
  
  
  

 
});

function productBox(){
	
		/*var winheight = $(window).height()/2;
		var thisHeight = $('.homeProductBox').height() / 2;
		winNewHe = winheight +thisHeight  ;
		$('.homeProductBox').css({'top':winNewHe});*/
			
	
		setTimeout(function () {
			var banneractive = $('.bannernav .activeSlide').index();
			var getBannerBodyheight = $('#banner li').eq(banneractive).find('img').height();	
			//alert(getBannerBodyheight);
			var proboxHeight =$('.homeProductBox').height();
			var topvalue = getBannerBodyheight;
				
			if(topvalue < 620 ){
					
				$('.homeProductBox').css({'top':topvalue});
			}else{
				$('.homeProductBox').css({'top':'680'});
			};
			
		 }, 2);
		//alert(producbodyheight);
		
	}


