$(function(){ // wait for the document to load
	var speed = 200;
	var open_speed = 500;
	var open_timer = null;
	
	var config = {    
		 sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
		 interval: 1, // number = milliseconds for onMouseOver polling interval    
		 over: function(){						
				$('.hover-bg',$(this).parent()).animate({opacity: "show"}, speed, function(){
					$('.cat_image-holder',$(this).parent()).animate({ opacity: "show"}, speed);
					$('.cat_image-frame',$(this).parent()).animate({ marginTop: "-4px", marginLeft: "-3px" }, speed);
					$('.cat_image-holder img',$(this).parent()).animate({ marginTop: "-4px", marginLeft: "-3px" }, speed);
				});
			}, // function = onMouseOver callback (REQUIRED)    
		 timeout: 500, // number = milliseconds delay before onMouseOut    
		 out: function(){
				$('.cat_image-frame',$(this).parent()).animate({ marginTop: "0px", marginLeft: "0px" }, speed);
				$('.cat_image-holder img',$(this).parent()).animate({ marginTop: "0px", marginLeft: "0px" }, speed, function(){
					$('.hover-bg',$(this).parent().parent()).animate({opacity: "hide"}, speed);
					$('.cat_image-holder',$(this).parent().parent()).animate({ opacity: "hide"}, speed);
				});
			} // function = onMouseOut callback (REQUIRED)    
	};
	
	$(".categories-box .az_cat a").hoverIntent( config )
	
	$(".header").hoverIntent( function(){						
		$('.categories').animate({height: "show", opacity: "show"}, open_speed);
	},function(){
		$('.categories').animate({height: "hide", opacity: "hide"}, open_speed);
	});
	
	
	$(".top_menu td a").hoverIntent( function(){						
		$(this).parent('div').addClass('hover');
		$(this).parent('div').next().addClass('hover1');
	},function(){
		$(this).parent().removeClass('hover');
		$(this).parent().next().removeClass('hover1');
	});
	
	
 });
