Cufon.replace('h1');
Cufon.replace('.navigation li a');
Cufon.replace('h2');
Cufon.replace('.headTag');
Cufon.replace('.productDesc h2');
Cufon.replace('.productDesc h3');
Cufon.replace('.leftPannel h4');
Cufon.replace('h5');
Cufon.replace('.productTitle h4');
Cufon.replace('.subNav li');
Cufon.replace('.text18pt');
Cufon.replace('.text12pt');

$(function (){
	var product3 = $('.product3');
	var imgenchtext = $('#imgenchtext');
	var imgenchtext_over = $('#imgenchtext_over')
	var nutritional_facts_img = $('.nutritional_facts_img')
	var nutritional_facts_img_over = $('.nutritional_facts_img_over')
	
	product3.mouseenter(function() {imgenchtext.hide();imgenchtext_over.show();});
	product3.mouseleave(function() {imgenchtext_over.hide();imgenchtext.show();});
	imgenchtext.mouseenter(function() {
		imgenchtext.hide();imgenchtext_over.show();
		product3.css('background-position','-471px -460px');
	});
	imgenchtext_over.mouseleave(function() {
		imgenchtext_over.hide(); imgenchtext.show();
		product3.css('background-position','-471px 0px');
	});
		
	$('#popup_close').click(function (){return false;});
	var popup_close_btn = $(".clsWindow");
	$(popup_close_btn).click(function() {
		var popup_id = '#'+ $(this).attr('id').substring(10);
		$(this).hide();
		$(popup_id).animate({
	      'opacity' : '0',
	      'margin-left' : '-70px',
	      'margin-top' : '170px',
	      'width'   : '0px',
	      'height'  : '10px'
	  }, 300, function() {
	    //alert("Done");
	  });
	  return false;
	});
	$('.nutri_popup_link').click(function() {
		var popup_id = $(this).attr('href');
		$(popup_id).animate({
			'opacity' : '100',
			'margin-left' : '0px',
			'margin-top' : '0px',
			'width'   : '184px',
			'height'  : '300px'
		}, 300, function() {
	    	$('#clsWindow-'+this.id).show();
	  });
	  return false;
	});
	
	
	$(nutritional_facts_img).mouseenter(function() { $(this).hide(); $('#'+'over_'+$(this).attr('id')).show(); });
	$(nutritional_facts_img_over).mouseleave(function() { $(this).hide(); $('#'+$(this).attr('id').substring(5)).show(); });
	
	$("#contact_form").validate({
	  rules: {
	    txtemailconfirm: {
	      equalTo: "#txtemail"
	    }
	  }
	});

});

