Cufon.replace('#banner h1, #footNav h6, #whichRight h1, #which-is-right h1, .mini-livechat h4');

$j = jQuery.noConflict();
jQuery(document).ready(function(){	
  // crazy pap swf object styling
  jQuery("div > object").parent().filter(":last").css("background-color", "#3D3D3E");
  
	// clear search default text on focus
	jQuery(".clearDefault").focus(function() {
		if( this.value == this.defaultValue ) {
			this.value = "";
		}
	}).blur(function() {
		if( !this.value.length ) {
			this.value = this.defaultValue;
		}
	});
	// submit forms on link click
	jQuery(".btnSearch").click(function() {
		var form = jQuery(this).parents('form:first');
		form.submit();
		return false;
	});
	// show phone number on hover
	jQuery("h2#phone").hover(function(){
		jQuery("h2#phone > .normal").hide();
		jQuery("h2#phone > .hover").show();
	},function(){
        jQuery("h2#phone > .normal").show();
		jQuery("h2#phone > .hover").hide();
    });
    
    // show currency selection on hover (top menu)
  var curtimer;
	jQuery("#currencyPopLink, #currencyPop").hover(function(){
		jQuery("#currencyPop").fadeIn(200);
		clearTimeout(curtimer);
	},function(){
    curtimer = setTimeout(function(){
      jQuery("#currencyPop").fadeOut(200);
    },200);
  });
  
  // show currency selection on hover (footer)
  var curtimer;
  jQuery("#currencyPopLink3, #currencyPop3").hover(function(){
  	jQuery("#currencyPop3").fadeIn(200);
  	clearTimeout(curtimer);
  },function(){
    curtimer = setTimeout(function(){
      jQuery("#currencyPop3").fadeOut(200);
    },400);
  });
  
  // show currency selection on hover (product view page)
  jQuery("#currencyPopLink2, #currencyPop2").hover(function(){
  	jQuery("#currencyPop2").fadeIn(200);
  	clearTimeout(curtimer);
  },function(){
    curtimer = setTimeout(function(){
      jQuery("#currencyPop2").fadeOut(200);
    },400);
  });
    
    // show newsletter info on ? hover
	jQuery("#q").add("#q2").add("#what").hover(function(){
		jQuery("#newsPop").fadeIn(200);
	},function(){
        jQuery("#newsPop").fadeOut(200);
    });
    // ingredients table
    jQuery("#ingredients .san").hide();
	jQuery("#showSan").click(function() {
		jQuery("#ingredients .san").show();
		jQuery("#ingredients .lat").hide();
		return false;
	});
	jQuery("#showLat").click(function() {
		jQuery("#ingredients .san").hide();
		jQuery("#ingredients .lat").show();
		return false;
	});
	// accordions
	jQuery(".accordion a.title").click(function() {
		jQuery(this).parent().parent().find("li p").slideUp(200);
		jQuery(this).parent().parent().find("li p").removeClass("open");
		jQuery(this).parent().parent().find("li a.title").removeClass("on");
		jQuery(this).next().slideDown(200);
		jQuery(this).addClass("on");
		return false;
	}).next().not(".open").hide();
    // fancy select boxes
	jQuery("#options select").sSelect();

});
