	/* Author: Thomas Fung */
	/* Function: Replace * with Highlight */
	$(document).ready(function(){
		
		// alert($("table.ProductPrice:contains('*')").length);
		
		var filename = window.location.href.substr(window.location.href.lastIndexOf("/") + 1);
		filename = filename.toUpperCase();	

		var filenamewithparameters = window.location.href
		filenamewithparameters = filenamewithparameters.toUpperCase();
		
		if (filename.indexOf("PRODUCTDISPLAY.ASPX") > -1)
		{			
			// Call ID: 18654			
			if ($("table.ProductPrice:contains('*')").length == 0) 
			{
				$(".SubCategoryProduct table.ProductPrice:contains('$'):first-child").each(function(i){											
					 $(this).find("td:last").addClass('PriceHighlight');
				});
			}
			else			
			{
				$("table.ProductPrice:contains('*')").each(function(i){							
					// $(this).addClass('PriceHighlight');
					$(this).find("td:last").addClass('PriceHighlight');
					$(this).find("td:last").html($(this).find("td:last").html().replace('*',''));		
				});
			}
			
			// Call ID: 24420			
			if ($("table.ProductPrice div.POA").length > 0)
			{
				// This product is P.O.A								
				$("div.POA").parent().parent().parent().find("td:first").empty();
				$("div.POA").parent().parent().parent().parent().parent().addClass('POAPadding');
				// alert($("div.POA").parent().parent().parent().parent().parent().html());
			}	

			$("table.ProductPrice").css('visibility', 'visible');
		}
						
	});
