$(document).ready(function(){
	$("div#rollover h2").hide();
	//disjointed rollover function starting point
	$("#nav li").hover(
		function(){							
			var elid = $(this).attr('class');	
			$("div#rollover h2").hide();	
			$("div#rollover h2." + elid + "").show();
			},
		function(){							
			$("div#rollover h2").hide();	
			}	
	);
});
$(document).ready( function(){
	//autoFill($("#user_email"), "Enter your email address");
	autoFill($("#search_keyword"), "Enter search keyword(s)");
});

/** Remove elements from DOM */
$(document).ready( function(){
	$('.linklove').remove(); /* cforms link */
	$('.reqtxt').remove(); /* cforms link */
	$('.emailreqtxt').remove(); /* cforms link */
});

function autoFill(id, v){
	$(id).css({ }).attr({ value: v }).focus(function(){
		if($(this).val()==v){
			$(this).val("").css({ });
		}
	}).blur(function(){
		if($(this).val()==""){
			$(this).css({ }).val(v);
		}
	});
	
}
$(document).ready(function(){
	//Hide div w/id extra
	$("#extra-fields").css("display","none");
	// Add onclick handler to checkbox w/id checkme
	$("#change_password").click(function(){
	// If checked
	if ($("#change_password").is(":checked"))
	{
		//show the hidden div
		$("#extra-fields").show();
	}
	else
	{	   
		//otherwise, hide it 
		$("#extra-fields").hide();
	}
	});
});

$(document).ready(function() {
	$(".filter_brand").change(function() {
        	var brand_id = $(this).val();
		window.location = ("?brand_id=" + brand_id);
	});

});
