$(document).ready(function() {
	
	var config = {    
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		interval: 200, // number = milliseconds for onMouseOver polling interval    
		over:  function () {
			$(this).append("<span class='bar'></span>");
			$(this).children('ul').toggle();
			},  // function = onMouseOver callback (REQUIRED)    
			timeout: 500, // number = milliseconds delay before onMouseOut    
		out: function () {
			$(this).children(".bar").remove();
			$(this).children('ul').toggle();
			}    
	};
	var config2 = {    
		sensitivity: 3, // number = sensitivity threshold (must be 1 or higher)    
		interval: 100, // number = milliseconds for onMouseOver polling interval    
		over:  function () {
			$(this).children('ul').toggle();
			},  // function = onMouseOver callback (REQUIRED)    
			timeout: 300, // number = milliseconds delay before onMouseOut    
		out: function () {
			$(this).children('ul').toggle();
			}    
	};
	
	$('#mainMenu > li').hoverIntent(config);
	$('#mainMenu ul > li').hoverIntent(config2);
	
	$("#mainMenu > li").hover(
		function(){
			$(this).append("<span class='bar'></span>");
		},
		function(){
			$(this).children(".bar").remove();
		});
	$(".list4 > li:even").addClass("odd");
	
	$('#gallery a').lightBox({fixedNavigation:true});
	
	$("#subscribeform").validate({
		rules: {
			newsemail: {
				required: true,
				email: true
			}
		},
		messages: {
			email: "Please enter a valid email address"
		},
		errorPlacement: function(error, element) {
			element.css("border", "1px #F00 solid");
		}
	});
});

