$(document).ready(function() {
	
	$('ul.sf-menu').superfish();
	
    $('input[type="text"]').addClass("idle");
	$('#quick-search input[type="text"],#newsletter input[type="text"],').focus(function() {
		$(this).removeClass("idle").addClass("focus");
        if (this.value == this.defaultValue){
        	this.value = '';
    	}
        if(this.value != this.defaultValue){
	    	this.select();
        }
    });
    $('input[type="text"]').blur(function() {
    	$(this).removeClass("focus").addClass("idle");
        if ($.trim(this.value == '')){
        	this.value = (this.defaultValue ? this.defaultValue : '');
    	}
    });

	var elem = location.href.split('#');
	if (elem.length > 1) {
		$('#'+elem[1]).show();
	}
	

    // Multiple Shipping on Checkout
    $("#custom-field-3").css("display","none"); // Hide text box asking for address

     // Add onclick handler to checkbox w/id checkme
    $("#custom-field-checkbox-2").click(function(){

     // If checked
     if ($("#custom-field-checkbox-2").is(":checked"))
     {
         //show the hidden div
         $("#custom-field-3").show("fast");
     }
     else
     {     
         //otherwise, hide it
         $("#custom-field-3").hide("fast");
     }
   });

});