/**
 * The following function removes the following
 * 	 single quotes
 * 	 double quotes
 * 	 registered symbol
 */
function removeQuotesAndR(str) {

	str = str.replace("&amp;#34;", "");
	str = str.replace("&amp;#39;", "");
	str = str.replace("&amp;quot;", "");
	str = str.replace("&amp;reg;", "");

	return str;
}

/** 
 * Removes amp from encoded querystring
 * due to & separators between parameters
 * 
 */
function removeAmp(urlString) {
	
	return urlString.replace("amp;", "");
}

function initZoom() {
	
	var zoomOptions = {
			zoomWidth: 380,	
			zoomHeight: 319,
			title: false
		};

	jQuery(".zoomimage").jqzoom(zoomOptions);
}

function swapImage(mainImage, zoomImage, productName) {
	
	jQuery("#pdpMain .productimage").html("<a class=\"zoomimage\" href=\"" + zoomImage + "\">" +
		                         "<img src=\"" + mainImage + "\" title=\"" + productName + "\"/></a>");
}

String.prototype.trim = function() {
	return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
	return this.replace(/^\s+/,"");
}
String.prototype.rtrim = function() {
	return this.replace(/\s+$/,"");
}
