/**
 * @author Mike
 */

$(document).ready(function() {
 
	/*$(".view-front-page-highlight-view .view-content").mouseover(function(){
		$(this).addClass("view-content-large");
    });
	
    $(".view-front-page-highlight-view .view-content").mouseout(function(){
		$(this).removeClass("view-content-large");
    });*/


	//THIS IS THE PROPER WAY TO TOGGLE A CLASS FOR CROSS BROWSER COMPATABILITY
	
	/*$(".view-front-page-highlight-view .view-content").bind("mouseenter mouseleave", function(){
		$(this).toggleClass('view-content-large');
    });*/
	
	$(".view-front-page-highlight-view .view-content .views-row-1 .highlight-inner-wrapper .highlight-read-more").hoverIntent({
		sensitivity: 300,
		interval: 400,
		over: enlargeWindow,
		out: empty
	});
	
	$(".view-front-page-highlight-view .view-content").hoverIntent({
		timeout: 400,
		over: empty,
		out: shrinkWindow
	});


	$(".block-views > .content").mouseover(function(){
		$(this).parent().addClass("block-views-index");
    });

    $(".block-views > .content").mouseout(function(){
		$(this).parent().removeClass("block-views-index");
    });
	
});

function enlargeWindow(){
    $(this).parent().parent().parent().addClass('view-content-large');
    $(this).parent().parent().parent().parent().parent().parent().addClass('hover-fix');
}

function shrinkWindow(){
    $(this).removeClass('view-content-large');
    $(this).parent().parent().parent().removeClass('hover-fix');
}
	
	//HoverIntent requires a funtion for both over and out even if you don't want anything to happen. 
	//This empty function is here to make it happy.
	function empty(){	}
