/*
 Author: Roy Lindauer
 Project: Vision Quest
 Date: December 2009
 Version: 1.0
*/

$(document).ready(function(){	
	
	$("#PopupLogin").click(function(){	
		$('#LoginBox').modal();
		return false;
	});

	$('#Messaging').cycle({
		speed:3000,
		timeout: 10000,
		fit: 1,
		width: '100%'
	});

	// fix for cycle to keep steps at 100% width
	$(window).resize(function(){
		$('#Messaging').width('100%');
	});
		
	function addMega(){
		$(this).addClass("hovering");
	}
	
	function removeMega(){
		$(this).removeClass("hovering");
	}
	
	var megaConfig = {
		 interval: 100,
		 sensitivity: 4,
		 over: addMega,
		 timeout: 500,
		 out: removeMega
	};
	
	$("li.mega").hoverIntent(megaConfig);

});

