$(document).ready(function() {

$(".shadow").shadowOn({
    imagepath: "/wp-content/themes/entertainmentresults/images/shadow", //Path to the shadowOn image folders
    imageset: "3"
});
	
$(".shadowon").shadowOn({
    imagepath: "/wp-content/themes/entertainmentresults/images/shadow", //Path to the shadowOn image folders
    imageset: "3"
});
	
	$('nav ul li a').each(function(){
		var cur = $(this);
		cur.html(cur.html().replace(/^(\w+)/, '<span>$1</span>'));
	});
	

	$("ul li:last-child").addClass('last-child');

	$("#main-form").validate();
	
	$(".slideshow").cycle({
		fx: 'scrollHorz', 
    prev:   '.slideshowContainer nav a.left', 
    next:   '.slideshowContainer nav a.right',
		pause: true
	});

	//Clear Inputs / Textareas that are not of the type 'submit'
	$('input,textarea').each(function() {if($(this).attr('type')!= 'submit'){var default_value = this.value;$(this).focus(function() {if(this.value == default_value) {this.value = '';}});$(this).blur(function() {if(this.value == '') {this.value = default_value;}});}$(this).hover(function(){$(this).addClass('display');},function(){$(this).removeClass('display');});});
	//Disclaimer Sliding Effect
	$('#main-form a.overlay_submit').click(function(){$('#overlay_response').slideToggle(500, function(){if($('#overlay_submit').html()=='Hide Disclaimer'){$('#overlay_submit').html('Show Disclaimer');} else {$('#overlay_submit').html('Hide Disclaimer');}});});

});
