;(function($) {
$(document).ready(function() {
	
	$('#navCon').children('ul').children('li').hoverIntent({
		over: function() {
			var navitem = $(this);
			navitem.toggleClass('hover').children('ul').slideToggle(500);
		},
		out: function() {
			var navitem = $(this);
			if(navitem.children('ul').length) {
				navitem.children('ul').slideToggle(500,function() {
					navitem.toggleClass('hover');
				});
			} else {
				navitem.toggleClass('hover');
			}
		},
		timeout: 50
	}).each(function() {
		if($(this).children('ul').length) {
			$(this).children('a').each(function() {
				$(this).click(function(e) {
					e.preventDefault();
				});
			});
		}
	});
	
	$('.lightbox').lightbox();
	if($('#testimonials').length) {
		var testimonial = Math.floor(Math.random() * $('#testimonials ul li').length);
		$('#testimonials div ul li').each(function(index,val) {
			if(index!=testimonial) $(this).hide();
		});
	}
	
})
})(jQuery);
