;(function($) {

$.fn.hoverfix = function() {
};

$(document).ready(function(){
var url = document.location.href;

if (url.match("store.wholeworldbotanicals.com") != null) {
	if (document.location.href == "http://store.wholeworldbotanicals.com/default.asp" || document.location.href == "http://store.wholeworldbotanicals.com/"  || document.location.href == "https://store.wholeworldbotanicals.com/" || document.location.href == "https://store.wholeworldbotanicals.com/default.asp") {
		$("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().addClass("roundTop");
		$("span.shortText").parent().parent().addClass("roundBot");
		$("#content_area table tbody tr td table tbody tr td table tbody tr td table tbody tr td font.pricecolor").parent().parent().addClass("normalize");
		$("#content_area table tbody tr td table tbody tr td table tbody tr td table").parent().addClass("normalizeRed");
		$("#content_area table tbody tr td table tbody tr td table tbody tr td table").parent().parent().parent().parent().addClass("normalizeRed");
		$("#content_area table tbody tr td table tbody tr td table").addClass("normalizeRed");
	}
	if (url.match("Royal-Camu-s") != null  || url.match("Royal-Maca-s") != null || url.match("Royal-Desmodium-s") != null || url.match("Royal-Cat-s-Claw-s") != null || url.match("Royal-Lucraco-Plus-s") != null || url.match("Royal-Graviola-s") != null || url.match("Royal-Abuta-Plus-s") != null || url.match("Royal-Break-Stone-s") != null || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Maca-s/3.htm" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Camu-s/1.htm" || document.location.href == "http://store.wholeworldbotanicals.com/SearchResults.asp" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Break-Stone-s/2.htm" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Desmodium-s/4.htm"  || document.location.href == "http://store.wholeworldbotanicals.com/category-s/26.htm" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Cat-s-Claw-s/5.htm" || url.match("SearchResults.asp") != null || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Lucraco-Plus-s/7.htm" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Graviola-s/6.htm" || document.location.href == "http://store.wholeworldbotanicals.com/Royal-Abuta-Plus-s/8.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Maca-s/3.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Camu-s/1.htm" || document.location.href == "https://store.wholeworldbotanicals.com/SearchResults.asp" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Break-Stone-s/2.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Desmodium-s/4.htm"  || document.location.href == "https://store.wholeworldbotanicals.com/category-s/26.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Cat-s-Claw-s/5.htm" || url.match("SearchResults.asp") != null || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Lucraco-Plus-s/7.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Graviola-s/6.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Abuta-Plus-s/8.htm") {
		if ($(".shortText").size() <= 2) {
			$("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().addClass("roundTop3");
			$("span.shortText").parent().parent().addClass("roundBot3");
		}
		else if ($(".shortText").size() >= 3) {
			$("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().addClass("roundTop2");
			$("span.shortText").parent().parent().addClass("roundBot2");
		}
    $("#content_area table tbody tr td table tbody tr td table tbody tr td table tbody tr td font.pricecolor").parent().parent().addClass("normalize");
		$("#content_area table tbody tr td table tbody tr td table tbody tr td table").parent().addClass("normalizeRed");
		$("#content_area table tbody tr td table tbody tr td table").addClass("normalizeRed");
		$("#jmenuhide").parent().parent().parent().parent().parent().parent().removeClass("normalizeRed");
    $("#jmenuhide").parent().parent().parent().parent().parent().parent().addClass("normalizeHeight");
		$("#jmenuhide").parent().parent().parent().parent().parent().parent().css("background-color","#FCFBE7");
	}
	
	$("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-top","6px");
	$(".shortText").parent().parent().css("padding-top","12px");
  $("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().css("padding-top","12px");	
  $("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-left","1px");
	$("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-right","1px");
	$(".shortText").parent().css("background-color","transparent");
	$(".productnamecolor").addClass("jProductnamecolor");
	$("font.productnamecolor").addClass("jProductnamecolor2");
	$("#content_area table tbody tr td table tbody tr td table tbody tr td table tbody tr td .colors_text").addClass("jColors_text");
	$(".pricecolor").addClass("jColors_text");
	$("font.pricecolor").addClass("jPricecolor");
	$("#display_cart_summary").css("display","none");
	$("#content_area").css("margin-top", "0px");
	$("#toolbar").css("margin-bottom", "-5px");
	$("#content_area table tbody tr td table tbody tr td table tbody tr td table tbody tr td .colors_text").removeClass("jColors_text");
  $("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-left","4px");
	$("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-right","4px");
  $("#content_area table tbody tr td table tbody tr td table tbody tr td").css("padding-top","0px");
} 

if (url.match("SearchResults.asp") != null) {
	if ($(".shortText").size() <= 2) {
		$("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().removeClass("roundTop2");
		$("span.shortText").parent().parent().removeClass("roundBot2");
		$("#content_area table tbody tr td table tbody tr td table tbody tr td a img").parent().parent().addClass("roundTop3");
		$("span.shortText").parent().parent().addClass("roundBot3");
	}
	$(".productnamecolor").removeClass("jProductnamecolor");
	$("font.productnamecolor").removeClass("jProductnamecolor2");
	$("#content_area table tbody tr td table tbody tr td table tbody tr td table tbody tr td .colors_text").removeClass("jColors_text");
	$(".pricecolor").removeClass("jColors_text");
	$("font.pricecolor").removeClass("jPricecolor");
	$("td.normalize .productnamecolor").addClass("jProductnamecolor");
	$("td.normalize font.productnamecolor").addClass("jProductnamecolor2");
	$("td.normalize .colors_text").addClass("jColors_text");
	$("td.normalize .pricecolor").addClass("jColors_text");
	$("td.normalize font.pricecolor").addClass("jPricecolor");
	}
	
	var itemIndex=new Array();
	var imgIndex = new Array();
	var imgSRC;
	for (i=0;i<=$(".normalize").size();i++){
		if ($(".roundTop").size() > 0) {
			imgSRC = $(".roundTop").eq(i).html();
			$(".roundTop").eq(i).html("");
		}
		else if  ($(".roundTop2").size() > 0) {
			imgSRC = $(".roundTop2").eq(i).html();
			$(".roundTop2").eq(i).html("");
		}
		else if  ($(".roundTop3").size() > 0) {
			imgSRC = $(".roundTop3").eq(i).html();
			$(".roundTop3").eq(i).html("");
		}
 		$(".normalize").eq(i).prepend(imgSRC);
	}

	$(".normalize a img").addClass("lefted");

	for (i=0;i<=$("a.productnamecolor").size();i++){
		itemIndex[i] = $("a.productnamecolor").eq(i).text();
		itemIndex[i] = itemIndex[i].replace("Royal Maca","<span class=\"productHeader\">Royal Maca</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Break-Stone","<span class=\"productHeader\">Royal Break-Stone</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Camu","<span class=\"productHeader\">Royal Camu</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Cat's Claw","<span class=\"productHeader\">Royal Cat's Claw</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Wildcrafted Royal Lucraco","<span class=\"productHeader\">Wildcrafted Royal Lucraco</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Lucraco","<span class=\"productHeader\">Royal Lucraco</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Abuta Plus","<span class=\"productHeader\">Royal Abuta Plus</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Graviola","<span class=\"productHeader\">Royal Graviola</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Desmodium","<span class=\"productHeader\">Royal Desmodium</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Allergy-Lung","<span class=\"productHeader\">Royal Allergy-Lung</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Liver \& Lung","<span class=\"productHeader\">Royal Liver \& Lung</span><br/>");
		itemIndex[i] = itemIndex[i].replace("Royal Strong Back","<span class=\"productHeader\">Royal Strong Back</span><br/>");
		$("a.productnamecolor").eq(i).html("");
                if ($(".roundTop").size() >0) {
                    $(".roundTop").eq(i).prepend("<a href=\"" + $("#content_area table tbody tr td table tbody tr td table tbody tr td a img").eq(i).parent().attr("href") + "\">" + itemIndex[i] + "</a><br/>");
                }
                if ($(".roundTop2").size() >0) {
                    $(".roundTop2").eq(i).prepend("<a href=\"" + $("#content_area table tbody tr td table tbody tr td table tbody tr td a img").eq(i).parent().attr("href") + "\">" + itemIndex[i] + "</a><br/>");
                }
                if ($(".roundTop3").size() >0) {
                    $(".roundTop3").eq(i).prepend("<a href=\"" + $("#content_area table tbody tr td table tbody tr td table tbody tr td a img").eq(i).parent().attr("href") + "\">" + itemIndex[i] + "</a><br/>");
                }
	}

if ($(".shortText").size() > 0) {
          for (n=0;n<=($(".shortText").size()-1);n++){
$(".normalize").eq(n).append("<br/><br/><a href=\"" + ($(".productHeader").eq(n).parent().attr("href")) + "\"><img src=\"/v/vspfiles/templates/wwbnew/images/buttons/btn_info.png\" /></a><br/>");           
          }
    }


if (url.match("store.wholeworldbotanicals.com") != null) {

if (document.location.href == "http://store.wholeworldbotanicals.com/default.asp"|| document.location.href == "http://store.wholeworldbotanicals.com/" || document.location.href == "https://store.wholeworldbotanicals.com/default.asp" || document.location.href == "https://store.wholeworldbotanicals.com/") {
$("#infoWrapper").css("display","block");
$("#infoWrapper #info span span").html("<strong>Whole World Botanicals offers Premium Quality Botanicals</strong><ul><li>Food-Source Dietary Supplements</li><li>Certified organic: by Bio Latina &amp; Control Union (SKAL), third party organic certification organizations on the USDA approval list. CCOF (California Certified Organic Farmers) also certifies our maca</li><li>Sustainably Wildcrafted</li><li>Bio-Energetically Grown and Harvested</li><li>Single Source Indigenous</li><li>Rigorous Quality Control of our Products includes tests for Species Identification; Hands-on inspection of Peruvian HAACP certified processing plants; Potency Analysis; Microbiological and Heavy Metal Screenings; U.S. Manufacture of Liquid Extracts, encapsulation and bottling in GMP plants which meet FDA standards</li></ul>");
}


if (document.location.href == "http://store.wholeworldbotanicals.com/Royal-Maca-s/3.htm" || document.location.href == "https://store.wholeworldbotanicals.com/Royal-Maca-s/3.htm") {
$("#infoWrapper #info span span").html("<strong>How does Royal Maca&reg; differ from other leading brands of maca?</strong><ul><li>Royal Maca&reg; is Certified Organic - USDA approved</li><li>Royal Maca&reg; is produced from sun dried maca roots</li><li>Royal Maca&reg; is cooked following both milennia-old tradition and scientific research</li><li>Royal Maca&reg; is bioenergetically grown for more potency and</li><li>Royal Maca&reg; is gelatinized to produce a maca concentrate</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","195px");
$("#infoWrapper #info span").css("height","165px");
$("#infoWrapper #info span span").css("height","135px");
$("#infoWrapper #search").css("height","195px");
$("#infoWrapper #search span").css("height","165px");
$("#infoWrapper #search span span").css("height","135px");
$("#infoWrapper").css("height","195px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vMaca").css("display","none");
}

else if (url.match("Royal-Camu-s") != null) {
$("#infoWrapper #info span span").html("<b>Camu</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a></li><li>Guaranteed 10% Vitamin C derived from the Camu-Camu fruit at the time of manufacture</li><li>Royal Camu Whole Fruit (without any additives) <a href=\"#\">USDA Certified Organic</a> by Control Union</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC)</li><li>Available as pleasant tasting powder (with maltodextrine for spray drying purposes) or Camu-Camu fruit and peel (slightly bitter) with no additives or in <a href=\"#\">SLS-Free</a> capsule form (<a href=\"#\">Gelatin</a> caps or <a href=\"#\">Vegetarian</a> caps)</li><li>Fruit collected in Peru and the final product is manufactured, bottled and packaged in the United States</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","295px");
$("#infoWrapper #info span").css("height","265px");
$("#infoWrapper #info span span").css("height","235px");
$("#infoWrapper #search").css("height","295px");
$("#infoWrapper #search span").css("height","265px");
$("#infoWrapper #search span span").css("height","235px");
$("#infoWrapper").css("height","295px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vCamu").css("display","none");
}

else if (url.match("Royal-Break-Stone-s") != null) {
$("#infoWrapper #info span span").html("<b>Break-stone</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a></li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available in <a href=\"#\">1:1 extract</a> (of phyllanthus niruri) <a href=\"#\">SLS-Free</a> <a href=\"#\">Vegetarian</a> capsule form or as an 1:1 strength Alcohol free liquid extract (Vegetable Glycerin used as stabilizer instead of alcohol) or as Loose tea</li><li>No fillers, excepients, or additives in capsules or tea</li><li><a href=\"#\">Heavy metal content</a> is undectectable in all Break-Stone liquid extracts</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC) and <a href=\"#\">Gas chromatography</a> (Potency testing)</li><li>Plant material is collected in Peru and the liquid extracts, capsules and tea are manufactured, bottled and packaged in the United States</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","305px");
$("#infoWrapper #info span").css("height","275px");
$("#infoWrapper #info span span").css("height","245px");
$("#infoWrapper #search").css("height","305px");
$("#infoWrapper #search span").css("height","275px");
$("#infoWrapper #search span span").css("height","245px");
$("#infoWrapper").css("height","305px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vBreakstone").css("display","none");
}

else if (url.match("Royal-Desmodium-s") != null) {
$("#infoWrapper #info span span").html("<b>Desmodium</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a></li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available in <a href=\"#\">1:1 extract</a> (of Desmodium ascendens) of <a href=\"#\">SLS-Free</a> <a href=\"#\">Vegetarian</a> capsule form or as an 1:1 strength Alcohol free liquid extract (Vegetable Glycerin used as stabilizer instead of alcohol) or as Loose tea</li><li>No fillers, excepients, or additives in capsules or tea</li><li><a href=\"#\">Heavy metal content</a> is undectectable in all Desmodium liquid extracts</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC) and <a href=\"#\">Gas chromatography</a> (Potency testing)</li><li>Plant material is collected in Peru and the liquid extracts, capsules and tea are manufactured, bottled and packaged in the United States</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","305px");
$("#infoWrapper #info span").css("height","275px");
$("#infoWrapper #info span span").css("height","245px");
$("#infoWrapper #search").css("height","305px");
$("#infoWrapper #search span").css("height","275px");
$("#infoWrapper #search span span").css("height","245px");
$("#infoWrapper").css("height","305px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vDesmodium").css("display","none");
}

else if (url.match("Royal-Cat-s-Claw-s") != null) {
$("#infoWrapper #info span span").html("<b>Cat\'s Claw</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a> from the Ashaninka Indians</li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available as 1:1 strength Liquid extract (prepared via Double extraction process for superior quality) and Loose tea (no fillers, excepients, or additives)</li><li><a href=\"#\">Heavy metal content</a> is undectectable in all Cat\'s Claw liquid extracts</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC) and <a href=\"#\">Gas chromatography</a> (Potency testing) and Total <a href=\"#\">Alkaloid testing</a></li><li>Plant material is collected in Peru and the liquid extracts and tea are manufactured in the United States</li><li>All products are gluten free, vegan</li></ul>");
$("#infoWrapper #info").css("height","270px");
$("#infoWrapper #info span").css("height","240px");
$("#infoWrapper #info span span").css("height","210px");
$("#infoWrapper #search").css("height","270px");
$("#infoWrapper #search span").css("height","240px");
$("#infoWrapper #search span span").css("height","210px");
$("#infoWrapper").css("height","265px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vCatsclaw").css("display","none");
}

else if (url.match("Royal-Lucraco-Plus-s") != null) {
$("#infoWrapper #info span span").html("<b>Lucraco</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a></li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available as 1:1 strength Liquid extract (prepared via Double extraction process for superior quality)</li><li><a href=\"#\">Heavy metal content</a> is undectectable in all Lucraco Plus liquid extracts</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC) and <a href=\"#\">Gas chromatography</a> (Potency testing)</li><li>Extensive clinical studies on effectiveness</li><li>Plant material is collected in Peru and the liquid extracts are manufactured in the United States</li><li>All products are gluten free, vegan</li></ul>");
$("#infoWrapper #info").css("height","290px");
$("#infoWrapper #info span").css("height","260px");
$("#infoWrapper #info span span").css("height","230px");
$("#infoWrapper #search").css("height","290px");
$("#infoWrapper #search span").css("height","260px");
$("#infoWrapper #search span span").css("height","230px");
$("#infoWrapper").css("height","290px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vLucraco").css("display","none");
}

else if (url.match("Royal-Graviola-s") != null) {
$("#infoWrapper #info span span").html("<b>Graviola</b><ul><li>Certified Organic and <a href=\"#\">Single Source indigenous</a></li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available as 1:1 Alcohol free liquid extract (Vegetable Glycerin used as stabilizer instead of alcohol)</li><li><a href=\"#\">Heavy metal content</a> is undectectable in all Graviola liquid extracts</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC) and <a href=\"#\">Gas chromatography</a> (Potency testing)</li><li>Plant material is collected in Peru and the liquid extracts are manufactured in the United States</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","270px");
$("#infoWrapper #info span").css("height","240px");
$("#infoWrapper #info span span").css("height","210px");
$("#infoWrapper #search").css("height","270px");
$("#infoWrapper #search span").css("height","240px");
$("#infoWrapper #search span span").css("height","210px");
$("#infoWrapper").css("height","270px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vGraviola").css("display","none");
}

else if (url.match("Royal-Abuta-Plus-s") != null) {
$("#infoWrapper #info span span").html("<b>Abuta Plus</b><ul><li>Wildcrafted and <a href=\"#\">Single Source indigenous</a></li><li>All raw material is <a href=\"#\">shade-dried</a></li><li>Available as 2:1 extract in <a href=\"#\">SLS-Free</a> <a href=\"#\">Vegetarian</a> capsule and <a href=\"#\">Gelatin</a> Capsule forms</li><li>No fillers, excepients, or additives in capsules</li><li>Each batch undergoes <a href=\"#\">Fingerprint analysis</a> (IRTLC)</li><li>Plant material is collected in Peru and the capsules are manufactured in the United States</li><li>All products are gluten free, vegan, and alcohol free</li></ul>");
$("#infoWrapper #info").css("height","250px");
$("#infoWrapper #info span").css("height","220px");
$("#infoWrapper #info span span").css("height","190px");
$("#infoWrapper #search").css("height","250px");
$("#infoWrapper #search span").css("height","220px");
$("#infoWrapper #search span span").css("height","190px");
$("#infoWrapper").css("height","250px");
$("#infoWrapper").css("display","block");
$("#visualMenu .vAbuta").css("display","none");
}

else {
$("#infoWrapper").css("display","none");
$("#toolbar").css("display","block");
$("#display_cart_summary").css("width","550px");
}

}

if (url.match("store.wholeworldbotanicals.com/register.asp") != null) {
$("#content_area table tbody tr td table tbody tr td").css("background-image","none");
}

if (url.match("store.wholeworldbotanicals.com/affiliate_info.asp") != null || url.match("Affiliate_info") != null ) {
$("#content_area table tbody tr td a img").css("display","none");
}

});
})(jQuery);