$(document).ready(function(){

var config = {
	sensitivity: 4, // number = sensitivity threshold (must be 1 or higher)
    interval: 200,
    over: sd, // function = onMouseOver callback (REQUIRED)    
    timeout: 1, // number = milliseconds delay before onMouseOut    
    out: su // function = onMouseOut callback (REQUIRED)    
};

function sd(){
	$(this).parent().find("ul").slideDown('slow').show()
	$(this).addClass("subhover");
}

function su(){
	
		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});
}

$("ul.topnav li a").hoverIntent( config )


	/*$("ul.topnav li a").mouseover(function() { //When trigger is clicked...

		//Following events are applied to the subnav itself (moving subnav up and down)
		$(this).parent().find("ul").slideDown('slow').show(); //Drop down the subnav on click

		$(this).parent().hover(function() {
		}, function(){
			$(this).parent().find("ul").slideUp('slow'); //When the mouse hovers out of the subnav, move it back up
		});

		//Following events are applied to the trigger (Hover events for the trigger)
		}).hover(function() {
			$(this).addClass("subhover"); //On hover over, add class "subhover"
		}, function(){	//On Hover Out
			$(this).removeClass("subhover"); //On hover out, remove class "subhover"
	});*/

	$(".box").click(function(){
		if($(this).val() == "Name" || $(this).val() == "Telephone" || $(this).val() == "Email"){
			$(this).val("");
			$(this).addClass("blackbold");
		}
	});

	$("#cn1").blur(function(){
		if($(this).val() == ""){$(this).val("Name"); $(this).removeClass("blackbold");};
	});
	
	$("#ct1").blur(function(){
		if($(this).val() == ""){$(this).val("Telephone"); $(this).removeClass("blackbold");};
		
	});	
	
	$("#ce1").blur(function(){
		if($(this).val() == ""){$(this).val("Email"); $(this).removeClass("blackbold");};
		
	});	
	
	$('.slideshow').cycle({
		fx: 'fade', timeout: 9000, delay:  -2000, pause:   1
	});

	$("#ticker").marquee({showSpeed: 1, pauseSpeed: 3000, scrollSpeed: 40});
	
	$('li.page-item-15 a').attr('target', '_blank');
  
});

