$(document).ready(function(){
	$(".clickable").click(function(){
    	window.location=$(".newscopy", this).find("a").attr("href");return false;
	});
	

	
	$(".clickblock").click(function(){
    	window.location=$(this).find("a").attr("href");return false;
	});
	
	$(".overlay").click(function(){
    	window.location=$(this).find("a").attr("href");return false;
	});
	
// easyslider

	$("#carousel").easySlider({
		controlsShow: false,
		auto: true, 
		speed: 800,
		continuous: true,
		pause: 7000,
		numeric: false
	});



// hover menu

// control hovers on the menu item

	// show
	$(".phover").mouseover(function(){ 
			$("#productmenu")
				.stop(true, true)
				.slideDown(300)
	});
	
	// hide with delay
	$(".phover").mouseleave(function(){ 
			$("#productmenu")
				.stop(true, true)
				.delay(1200)
				.slideUp(200)
	});
	
	// hides the box on clicking a link  
	$('#productmenu a').click(function() {
		$('#productmenu').fadeOut(100);
	});

 // hides the box on mouseleave    
	$("#productmenu").mouseleave(function(){
		$(this)
			.stop(true, true)
			.delay(1200)
			.slideUp(200);
			
	});
	
 // stops box hiding when re-entering  
	$("#productmenu").mouseenter(function(){
		$(this)
			.stop(true, true)
			.slideDown(100);
			
	});

	
	
// add arrow to parent list items 
	$("#productmenu")
		.find('>li a')
		.append('&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&rsaquo;');

		
		
// pop up menu control		
	$("#productmenu li").hover(function(){ 
        $(this).find('ul:first')
			.stop(true, true)
			.css("visibility","visible")
			.css("display","none")
			.fadeIn(300);
        },function(){ 
        $(this).find('ul:first')
			.stop(true, true)
			.css("display","block")
			.fadeOut(200);
		
        }); 



	$(".nodisc a").mouseenter(function(){
		$(this).next("p")
			.stop(true, true)
			.delay(300)
			.slideDown(500);
	});	
	
	$(".nodisc a").mouseleave(function(){
		$(this).next("p")
			.stop(true, true)
			.delay(2000)
			.slideUp(500);
	});	
	
	$(".desc").mouseenter(function(){
		$(this)
			.stop(true, true)
			.slideDown(500);
	});

	$(".desc").mouseleave(function(){
		$(this)
			.stop(true, true)
			.delay(2000)
			.slideUp(500);
	});	
	
	$(".theproduct").mouseenter(function(){
		$(this).next(".overlay")
			.stop(true, true)
			.slideDown(500);
	});

	$(".theproduct").mouseleave(function(){
		$(this).next(".overlay")

			.delay(500)
			.slideUp(500);
	});	
			
	$(".overlay").mouseenter(function(){
		$(this)
			.stop(true, true)
			.slideDown(200);
	});
	
		$(".overlay").mouseleave(function(){
		$(this)
			.delay(500)
			.slideUp(500);
	});

});
