
	$(document).ready(function(){
 	
	//$(".nav ul li").hover( function(){$(".sub", this).fadeIn(100);}, function(){$(".sub",this).fadeOut(100);} );
	
	//$("input").focus(function () {
		//$(this).css('background-position','bottom left');
	//});
	//$("input").blur(function () {
		//if ( $(this).val() == '' ) {
			//$(this).css('background-position','top left');
		//}
	//}); 
	$.fn.search = function() {
	return this.focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
	};
	$("input[type=text]").search();
	
	
	$(".catagory").click(function(){
		$(this).next().toggleClass("active");
		$(this).toggleClass("open");
	});
	
	// Facts Revolver
	$(".facts span").quovolver();
	$(".testimonials blockquote").quovolver();
	//$('marquee').marquee();

	// Homepage Feature Navigation
	// Hide all sub-nav
	$(".subs").hide();
	
	jQuery.fn.fadeToggle = function(speed, easing, callback) {
		return this.animate({opacity: 'toggle'}, speed, easing, callback);
	};
    
	$(".home .subnav a.btn").mouseover(function () {
		$(".subs").hide();
		$(".open").removeClass("open");
		$(this).next().fadeToggle();
		$(this).addClass("open");
    }); 

	$("#sub1").mouseleave(function(){ $("#sub1").fadeOut(); });
	$("#sub2").mouseleave(function(){ $("#sub2").fadeOut(); });
	$("#sub3").mouseleave(function(){ $("#sub3").fadeOut(); });
	$("#sub4").mouseleave(function(){ $("#sub4").fadeOut(); });
	$("#sub5").mouseleave(function(){ $("#sub5").fadeOut(); });
	$("#sub6").mouseleave(function(){ $("#sub6").fadeOut(); });
	
});
