$(document).ready(function() {
	
	// Clear fields
	$('.clearField').clearField({ blurClass: 'blurred', activeClass: 'active' });


	// Where to Buy Carousel
	if($('#where')[0]){
		$('#where ul').jcarousel({
			scroll: 3,
			wrap: "both",
			animation: 800,
			easing: "easeInOutQuart"
		});
	}
	
	$('#navigation > ul > li').each(function() {
		this.className += " " + this.className;
		$(this).hover(
			function() { this.className += "-hover hover" },
			function() { this.className  = this.className.replace('-hover hover', '') }
		);
	});
	

});





/*
//  PNG Fixer
//
*/


if(typeof DD_belatedPNG !== 'undefined'){
	$('#header li').hover(
		function() { $(this).addClass("hover") },
		function() { $(this).removeClass("hover") }
	);
	// DD_belatedPNG fix for IE6
	var PNG_fix_selectors = [
	    '#featured-video a'
	];
	DD_belatedPNG.fix(PNG_fix_selectors.join(','));
}



/*
//  Validate
//
*/

function validateEmail(email) {
	return (email.indexOf(".") > 2) && (email.indexOf("@") > 0);
}


function isNumeric(sText)
{
var ValidChars = "0123456789.";
for (i = 0; i < sText.length; i++) {
if (ValidChars.indexOf(sText.charAt(i)) == -1) {
return false;
}
}
return true;
}

