//document.domain = location.hostname;


var giftFinder = false;
var closeButton = '<button name="closeButton" class="closeButton" id="closeButton"><span class="buttonLeft"><span class="buttonRight"><span class="buttonContent">Close</span></span></span></button>';
var closeEmptyTitle = '<p></p>'+closeButton;

var s7imgPath = 'relic';
var colorboxComplete =
	function() {
		$('#cboxLoadedContent').css('margin-top', '50px');
	}

var hostname = document.location.hostname;
var initialProductSku = ''; //needed for quick look pages

var COMPARISON_LIST_COOKIE_NAME = 'compare.listId';

var miniCartDefer = null;
var comparisonDefer = null;

var isDevelopment = hostname.match( /local/ ) || hostname.match( /assetstore-stage/ ) || hostname.match( /redgell-stage/ ) || hostname.match(/172.30/) || hostname.match(/127./) ? true : false;

var shoppingBag_URL = '/webapp/wcs/stores/servlet/FSAJAXService?service=getMiniCart&URL=MiniCartView&langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();
var shoppingBag_local_URL = '/AssetStore/WatchStation/_common/request/shoppingBagContents.php?store_name=WatchStation&store_directory=WatchStation&local_lang=en_US';
if(isDevelopment){ shoppingBag_URL = shoppingBag_local_URL; }

//comparison dropdown
//NOTE: Local empty comparison dropdown is comparisonDropdownEmpty.php
var comparisonInfo_URL = '/webapp/wcs/stores/servlet/ComparisonDropDownMenuView?langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();
var comparisonInfo_local_URL = '/AssetStore/WatchStation/_common/request/comparisonDropdownContents.php?abc=abc';
var comparisonInfo_empty_local_URL = '/AssetStore/WatchStation/_common/request/comparisonDropdownEmpty.php?abc=abc';
if(isDevelopment){ comparisonInfo_URL = comparisonInfo_local_URL; }

//add to comparison list
var comparisonAddProduct_URL = '/webapp/wcs/stores/servlet/FSAJAXService?service=addItemToList&quantity=1&langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();
var comparisonAddProduct_local_URL = '/AssetStore/WatchStation/_common/request/generic_ajaxsuccess.php?abc=abc';
if(isDevelopment){ comparisonAddProduct_URL = comparisonAddProduct_local_URL; }

//create new list and add to comparison list
var comparisonCreateListAddProduct_URL = '/webapp/wcs/stores/servlet/FSAJAXService?service=createListAndAddItem&name=comp&public=false&listType=comparisonlist&quantity=1&langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();
var comparisonCreateListAddProduct_success_local_URL = '/AssetStore/WatchStation/_common/request/comparisonCreateListAndAddItemSuccessResponse.php?abc=abc';
var comparisonCreateListAddProduct_failure_local_URL = '/AssetStore/WatchStation/_common/request/comparisonCreateListAndAddItemFailureResponse.php?abc=abc';
if(isDevelopment){ comparisonCreateListAddProduct_URL = comparisonCreateListAddProduct_success_local_URL; }

//quick look
var quick_look_url = '/webapp/wcs/stores/servlet/ProductQuickLookView?langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();
var quick_look_local_url = '/AssetStore/WatchStation/en_US/quickLook.php';
if(isDevelopment){ quick_look_url = quick_look_local_url; }

//register email list (wishlist&pdp)
var registerEmailList_url = '/webapp/wcs/stores/servlet/EmailLookup?URL=EmailSignupThanksView&addressField3=email_signup&errorViewName=EmailSignupView&nav=custCareNav&optInsignupmailingListId=2039040&page=emailSignup&langId=' + getLangId() + '&storeId=' + getStoreId() + '&catalogId=' + getCatalogId();

//Onload function in shell, loads on every page load.
$(document).ready(function(){
	
	$('#help p').html("<span class='orange'>AUTHORIZED DEALER</span>")

	//Cufon include
	Cufon.replace('#banner p, h2.bannerText, #catFeature h3, #storeLocator .content h1');

	//ie6 hackery
	var isMSIE = /*@cc_on!@*/false;

	//Call Get Mini Cart Info. Pass in empty function because no callback needed for default.
	//Only call it on non quicklook pages
	if( typeof(quickLook_productInfo_URL) === 'undefined' ) {
		getMiniCartInfo( function(){  } );
	}

	// account dropdown
	var accountHoverConfig = {
		over: accountSlideDown,
		out: accountSlideUp
	};
    $('#accountWrapper').hoverIntent(accountHoverConfig);
    var dropdownOffset = 27;
	var accountWidth=$('#accountButtonWrapper').width() + $('#headerAccWrap').width() + $('#cartWrapper').width();
	$('#accountDropdown').width(accountWidth + dropdownOffset);

    //Call Get Comparison Info. Pass in empty function because no callback needed for default.
    getComparisonInfo( function(){} );

	// Setup default validation
	$('.validate').FSvalidate();

	// Promo Code Toggle
	$('form#promoCode').before('<div class="havePromo"><a href="javascript:void(0);">Have a Promo Code?</a></div>');
	$('.havePromo').click(function() {
		$(this).remove();
		$('form#promoCode').css({
  			visibility: 'visible',
			height: '75px'
		});
	});
	
	/******* Footer Email Signup ******/
	$("#emailListSignupForm").FSvalidate({
		validateOnBlur: true,
		validateOnKeyup: false,
		validateOnChange: false,
		showValidation: function(obj, settings){},
		errorStyle: {},
		errorHandler: function(obj, settings) {
			//set error message
			$(obj).data('email', $(obj).val())
				.val($(obj).data('errorMessage'))
				.unbind('focus')
				.focus( function() {
					var currentValue = $(this).data('email');
					if( currentValue && (currentValue!="Join Our Mailing List") && (currentValue!="Invalid Email Address") ) {
						$(this).val($(this).data('email'));
					}
					else {
						$(this).val('');
					}
				});
		}
	});

	$('#signupListEmail').val('Join Our Mailing List')
		.addRule({'name':'required', 'message':'Join Our Mailing List'})
		.addRule({'name':'email', 'message':'Invalid Email Address'})
		.focus( function(){
			if(this.value=="Join Our Mailing List" || this.value=="Invalid Email Address") {
				this.value='';
			}
		})
		.blur( function(){
			if(this.value=='')
				this.value="Join Our Mailing List";
		}
	);

	//email signup footer
	$("#signupSubmit").bind('click', function(e) {
		if ($('#emailListSignupForm').valid()) {
			registerEmailAddress();
		}
		return false;
	});

	function registerEmailAddress() {
		$.ajax({
			url:'/webapp/wcs/stores/servlet/EmailLookup',
			type: 'post',
			data: $('#emailListSignupForm').serialize(),
			dataType: 'text',
			cache:false,
			success: function(html){
				registerEmailResponse();
				return false;
			},
			error: function() {
				registerEmailResponse();
				return false;
			}
		});

		return false;
	}

	function registerEmailResponse() {
		$('#emailListSignupForm').remove();
		$('#footerSec3 .emailBox').prepend("<p><strong>Thank you for signing up.</strong></p>");
	}
	/******* END Footer Email Signup ******/


	//header search box
	$('#headerSearchInput').val('search by keyword or style #');
	$("#headerSearchInput").focus(function(){
		if(this.value == "search by keyword or style #" || "Please enter search criteria." || "Please enter at least three characters.") {
			this.value='';
		}
	}).bind('blur',function(){
		if(this.value == ''){
			this.value="search by keyword or style #";
		}
	});
	//$("#headerSearchForm").FSvalidate();
	//$("#headerSearchInput").FSvalidate().addRule({'name':'minLength', 'message': errMapMsg_29, 'options' : {'minLength' : 3}});

	/* opens external links in a new window if they have class="external" defined */
	$("a.external").click(function(){
		window.open(this.href,'external','location=yes,scrollbars=yes,menubar=yes,resizable=yes,toolbar=yes,status=yes,width=700,height=500,left='+(screen.availWidth/2-350)+',top='+(screen.availHeight/2-250)+'' );
		return false;
	});


    /****** Header Navigation ******/
	var navHoverConfig = {
		timeout: 500,
		over: nav_hover_over,
		out: nav_hover_out
	};
    $('ul.header-nav .headerMenuTitle').hoverIntent(navHoverConfig);
    //Platform images dont have a hover image
	//$('div.header-dropdown img').hover(dropdown_image_over,dropdown_image_out);

    //This has to be at the document ready level or it will be reattaching on each hover causing multiple launches
    $('.header-dropdown').hover(
		function(){
			$(this).addClass('inDropDown');
		},
		function(){
			$(this).removeClass('inDropDown').slideUp('fast');
			$('ul.header-nav li.nav-open').removeClass('nav-open');
		}
	);
    /****** END Header Navigation ******/
});//end document ready function




/********************************************* Header Navigation Functions *********************************************/
function nav_hover_over(){
	if( $('ul.header-nav li.nav-open').length == 0 ) {
		$($(this).attr('id').replace('menu-','#nav-')).slideDown('fast');
	}
	else {
		//hide other menus then show the current menu
		$('.header-dropdown').hide();
		$($(this).attr('id').replace('menu-','#nav-')).show();
	}

	$(this).parent().addClass('nav-open');
}

function nav_hover_out() {
	if($(this).parent().hasClass('nav-open') && $('.header-dropdown.inDropDown').length == 0) {
		$($(this).attr('id').replace('menu-','#nav-')).slideUp('fast');
		$(this).parent().removeClass('nav-open');
	}
}

function dropdown_image_over() {
	$(this).attr('src',$(this).attr('src').replace('.jpg','_on.jpg'));
}

function dropdown_image_out() {
	$(this).attr('src',$(this).attr('src').replace('_on',''));
}

// assign men's and women's links
$(document).ready(function() {
	$('#menu-womens').click(function() {
		window.location = '/store/WatchStation/en_US/shop/womens.html';
	});
	$('#menu-mens').click(function() {
		window.location = '/store/WatchStation/en_US/shop/mens.html';
	});
});

/********************************************* END Header Navigation Functions *********************************************/



/********************************************* MY ACCOUNT DROPDOWN *********************************************/
accountSlideDown = function() {
	$('#accountButton').addClass('showBag');
	$('#accountWrapper').css({
		backgroundColor: '#E8E8E6'
	});
	$('#accountDropdown').css({
		//width: '343px'
	});
	$('#accountDropdown').slideDown('fast').show();
};

accountSlideUp = function() {
	$('#accountDropdown').slideUp('fast',
		function() {
			$('#accountButton').removeClass('showBag');
			$('#accountWrapper').css({
				backgroundColor: 'transparent'
			});
			$('#accountDropdown').hide();
		}
	);
}
/********************************************* END MY ACCOUNT DROPDOWN *********************************************/


/********************************************* MINI CART DROPDOWN *********************************************/
slideDown = function() {
	$('#cartButton').addClass('showBag');
	$('#cartWrapper').css({
		backgroundColor: '#E8E8E6'
	});
	$('#cartButton>a').css({
		backgroundImage: "url('/wcsstore/WatchStation/images/en_US/header/arrDown.gif')"
	});
	$('#cartDropdown').slideDown('fast').show();
};

slideUp = function() {
	$('#cartDropdown').slideUp('fast',
		function() {
			$('#cartDropdown').hide();
			$('#cartWrapper').css({
				backgroundColor: 'transparent'
			});
			$('#cartButton>a').css({
				background: "url('/wcsstore/WatchStation/images/en_US/header/arrRight.gif') no-repeat center right"
			});
			$('#cartButton').removeClass('showBag');
		}
	);
}

function getMiniCartInfo( callbackFunction ) {
	miniCartDefer = $.ajax({
			url: shoppingBag_URL,
			cache: false,
			success: function(html){
				if (document.getElementById('cartButtonWrapper') != null && html.indexOf('<span id="global_bag_qty">0</span>') == -1) {

					//call empty because we want to clear all events associated with contents of cart
					$('#cartButtonWrapper').empty().append(html);

					var cartHoverConfig = {
						over: slideDown,
						out: slideUp
					};
				    $('#cartWrapper').hoverIntent(cartHoverConfig);

				}
				enableEspotModals();

				//Do any necessary call back function.
				callbackFunction();
				
				//REMOVE WHEN GIFTFINDER IS REMOVED
				giftFinder = true;
	        }
	    });
}
/********************************************* END MINI CART DROPDOWN *********************************************/


/********************************************* COMPARISON DROPDOWN *********************************************/
compareSlideDown = function() {
	$('#compareButton').addClass('showBag');
	$('#compareDropdown').slideDown('fast').show();
}

compareSlideUp = function() {
	$('#compareDropdown').slideUp('fast',
		function() {
			$('#compareButton').removeClass('showBag');
			$('#compareDropdown').hide();
		}
	);
}

function comparisonFiveItemLimiter() {
	var emptyComparisonItem = [ '<div class="compareDropdownProduct">',
	                           		'<p class="compareHeaderEmpty"></p>',
	                           		'<img src="/wcsstore/WatchStation/images/en_US/header/CompareNoProduct.jpg" />',
	                           	'</div>' ];

	//if less than 5 items, insert more padding
	var numOfComparisonItems = $('#compareDropdown .compareDropdownProduct').length;
	if( numOfComparisonItems < 5 ) {
		for( var i=0; i<5-numOfComparisonItems; i++ ) {
			$('#compareDropdownFooter').before( emptyComparisonItem.join('') );
		}
	}

	//if more than 5 items, hide remaining
	$('#compareDropdown .compareDropdownProduct').each( function(comparisonProductIndex) {
		if( comparisonProductIndex < 5 ) {
			$(this).show();
		}
		else {
			$(this).hide();
		}
	});

	//update number of items being displayed
	var displayingItemsText = '';
	var validItems = $('#compareDropdown .compareDropdownProduct .compareHeader').length;
	if( validItems < 5 ) {
		displayingItemsText = validItems;
	}
	else {
		displayingItemsText = '5 of ' + validItems;
	}

	$('#compareDropdownFooter p strong').html(displayingItemsText);
}

/**
 * Calls getComparisonInfo service IF user has a list id in browser cookie
 * @param callbackFunction
 */
function getComparisonInfo( callbackFunction ) {
	//read the list id from the user's cookie
	var comparisonListId = readCookie(COMPARISON_LIST_COOKIE_NAME);

	$.when( miniCartDefer )
	.then( function() {
		if (document.getElementById('compareWrapper') != null && comparisonListId != null ) {
			comparisonDefer = $.ajax({
				url: comparisonInfo_URL + '&listId=' + comparisonListId,
				cache: false,
				success: function(html) {
					if (html.match('display products in the list')) {
						//call remove because we want to clear all events associated with contents of comparison dropdown
						$('#compareDropdown').remove();
						$('#compareWrapper').append(html);

						//ensure only 5 items displayed at a time
						comparisonFiveItemLimiter();

						//wire up remove item events
						$('#compareDropdown .compareDropdownProduct .compareHeader a').click( function() {
							var itemId = ($(this).parent().find('.comparisonItemId').attr('id')).substringAfter('_');

							var dataToPass = {
								service:'deleteItemFromList',
								storeId:getStoreId(),
								catalogId:getCatalogId(),
								langId:getLangId(),
								listId:comparisonListId,
								itemId:itemId
							};

							var ajax_url = getServletPath() + 'FSAJAXService';
							//The following mods to ajax_url is for development
							if( isDevelopment ) {
								ajax_url = '/AssetStore/WatchStation/_common/request/generic_ajaxsuccess.php';
							}

							$.ajax({
								url: ajax_url,
								data: dataToPass,
								type: 'get',
								context: this,
								cacheBoolean: false,
								dataType: 'json',
								success: function (data, textStatus, XMLHttpRequest) {
									if (typeof data.success !== "undefined") {
										//Unhighlight compare icon
										var name = ($(this).parent().parent().find('a img').attr('title') + 'P');
										$('.' + name + ' .prodCompare a').css( {'background-position':'0px 0px'} );

										//modify array for quicklook
										comparisonList.items = jQuery.grep(comparisonList.items, function(value) { return value.itemId != itemId;});

										//if on My Comparison List page, remove item
										if( typeof afterDeleteListItem == 'function' && $('#wishlistTitle').html() == 'My Comparison List' ) {
											tempObj = new Object();
											tempObj.itemId = itemId;
											afterDeleteListItem( tempObj, null );
										}

										//remove item
										$(this).parent().parent().remove();

										comparisonFiveItemLimiter();
									}
									else {
										alert('Error removing item from comparison list.');
									}
								},
								error: function(data) {
									alert('Error removing item from comparison list. Please try again later.')
								}
							});

							return false;
						});

						wireComparisonDropdown();

						//Highlight compare icon
						highlightCompareIcon();

						//Do any necessary call back function.
						callbackFunction();
					}
					else if( html.match('no products in the list') ) {
						wireComparisonDropdown();
					}
		        }
		    });
		}
		else {
			wireComparisonDropdown();
		}
	});
}

function wireComparisonDropdown() {
	//this is used when the slidedown is invoked by add to comparison and mouse is over comparison, so we do not want to auto hide
	$('#compareDropdown').hover( function(){ $(this).addClass('mouseover'); }, function(){ $(this).removeClass('mouseover'); } );

    var comparisonHoverConfig = {
    	over: compareSlideDown,
    	out: compareSlideUp
    };
    $('#compareWrapper').hoverIntent(comparisonHoverConfig);
}

function highlightCompareIcon() {
	//Highlight the compare icons for the products in the list
	if (typeof(comparisonList) != 'undefined') {
		$.each(comparisonList.items, function() {
			$('.' + this.imagePath + 'P .prodCompare a').css({
				backgroundPosition: '0px -26px'
			});
		});
	}
}

function isBeingCompared ( matchString, comparisonListId, comparisonCheckCallBackFunction ) {
	comparisonCheck = $.ajax({
		url: comparisonInfo_URL + '&listId=' + comparisonListId,
		cache: false,
		success: function(html) {
			if (typeof(comparisonList) != 'undefined') {
				$.each(comparisonList.items, function(i) {
					if ( this.itemId == matchString ) {
						comparisonCheckCallBackFunction();
					}
					else {
						i++;
					}
				});
			}
		}
	});
	return false;
}

/********************************************* END COMPARISON DROPDOWN *********************************************/


/********************************************* ADD TO COMPARISON **************************************************/
function showThenHideComparison() {
	var getComparisonInfoCallback = function() {
    	//scroll to top of page
    	$('html, body').animate({scrollTop:0}, 'slow');

    	compareSlideDown();
		timeout = setTimeout( 'slideUpComparisonIfNotActive()', 5000 );
	}

	getComparisonInfo( getComparisonInfoCallback );
}

function slideUpComparisonIfNotActive() {
	if( !$('#compareDropdown').hasClass('mouseover') ) {
		compareSlideUp()
	}
}


function addToComparison( itemId ) {
	callAddToComparisonService(itemId, showThenHideComparison);
}

function callAddToComparisonService(itemId, successCallbackFunction) {
	var addProductURL = '';
	var isNewComparisonList = false;

	//THIS IS FOR TESTING PURPOSES...
	//eraseCookie( COMPARISON_LIST_COOKIE_NAME );

	//call different services depending on whether list already exists or not
	var comparisonListId = readCookie(COMPARISON_LIST_COOKIE_NAME);

	if( comparisonListId == null ) {
		//No previous comparison list id. Create new and add item

		addProductURL = comparisonCreateListAddProduct_URL + '&listId=' + comparisonListId + '&itemId=' + itemId;

		$.ajax({
			url: addProductURL,
			type: 'get',
			dataType: 'json',
			cache:false,
			success: function(html){
		    	if( html.listId != null ) {
					//get listId from service then create a cookie for it
		    		createCookie( COMPARISON_LIST_COOKIE_NAME, html.listId, 0 );

		    		successCallbackFunction();
				}
				else {
					alert('Error adding product to Comparison Cart. Product may already be in Comparison Cart. Please try again later.');
				}
	        },
	        error: function() { alert("Error adding item to comparison list. Please try again later"); }
	    });
	}
	else {
		//Previous comparison list id found. Add new item
		addProductURL = comparisonAddProduct_URL + '&listId=' + comparisonListId + '&itemId=' + itemId;

		$.ajax({
			url: addProductURL,
			type: 'get',
			dataType: 'json',
			cache:false,
			success: function(response){
		    	if (typeof response.success !== "undefined") {
		    		//setCookie( COMPARISON_LIST_COOKIE_NAME, comparisonListId, 365 );
		    		successCallbackFunction();
				}
				else {
					alert('Error adding product to Comparison Cart. Product may already be in Comparison Cart. Please try again later.');
				}
	        },
	        error: function() { alert("Error adding item to comparison list. Please try again later"); }
	    });
	}

}
/********************************************* END ADD TO COMPARISON***********************************************/

/*** Utility to open quick look modal ***/
function openQuickLook( productSku ) {
	initialProductSku = productSku;

	$.colorbox({href: quick_look_url, width: 1000, innerHeight: 685, opacity: 0.8, iframe: true});
}
/*** End Utility to open quick look modal ***/


//Global Functions
var enableEspotModals = function(){
	$('.freeGiftEspot').colorbox({width:"678px", height:"622px", opacity: 0.3, iframe: true, title:'<p>Free Gift with Purchase</p>'+closeButton});
	$('.eSpotDetailsGlobal').colorbox({width:"867px", height:"622px", opacity: 0.3, iframe: true, title:'<p>Special Offers Details</p>'+closeButton});
};

function registerEmailList( emailAddress, successCallback ) {
	$.ajax({
		url: registerEmailList_url + '&signupEmail=' + emailAddress,
		type: 'get',
		dataType: 'html',
		cache:false,
		success: function(html){
	    	//TODO can we do a match for success?
	    	successCallbackFunction();
        },
        error: function() { alert("Error adding to email list. Please try again later"); }
    });

	//TODO this function will be defined by Kevin
	successCallback();
}

function addScript(source){
	var s = document.createElement("script");
	s.type = "text/javascript";
	s.src = source;
	$("head").append(s);
};

function getParameterByName( name )
{
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return decodeURIComponent(results[1].replace(/\+/g, " "));
}

String.prototype.substringBefore = function( matchString ) {
	var matchIndex = this.indexOf( matchString );
	var returnString = '';
	if( matchIndex != -1 ) {
		returnString = this.substr(0, matchIndex);
	}
	return returnString;
};

String.prototype.substringAfter = function( matchString ) {
	var matchIndex = this.indexOf( matchString );
	var returnString = '';
	if( matchIndex != -1 ) {
		returnString = this.substr(matchIndex + matchString.length, this.length);
	}

	return returnString; //changed to nothing since no match found - for searchResults build param
};

String.prototype.substringBeforeLast = function( matchString ) {
	var matchIndex = this.lastIndexOf( matchString );
	var returnString = '';
	if( matchIndex != -1 ) {
		returnString = this.substr(0, matchIndex);
	}
	return returnString;
};

String.prototype.substringAfterLast = function( matchString ) {
	var matchIndex = this.lastIndexOf( matchString );
	var returnString = '';
	if( matchIndex != -1 ) {
		returnString = this.substr(matchIndex + matchString.length, this.length);
	}
	return returnString;
};

String.prototype.replaceAll = function( replace, with_this ) {
	return this.replace(new RegExp(replace, 'g'),with_this);
}


/*** Utility to get product tooltip description ***/
var TOOLTIP_DESC_MAP = {
	'Case Size':'Describes the diameter of the watch case.',
	'Case Thickness':'Describes the length from the top of the crystal to the bottom of the watch case.',
	'Band Width':'Describes the width of the watch bracelet or strap.',
	'Water Resistant':'Water resistance is measured in units of atmosphere (ATM). Each ATM is equivalent to 10 meters of static water pressure. Measurements of 1 ATM are considered \'resistant\' and will withstand splashes of water but should not be submerged. Measurements of 20 ATM are considered water proof and may be submerged.',
	'Origin':'Country where watch is manufactured.'
};
function getTooltipDescription( tooltipTitle ) {
	var tooltipTitleParsed = jQuery.trim( tooltipTitle.substringBeforeLast(':') );
	if( tooltipTitleParsed == null ) {
		tooltipTitleParsed = jQuery.trim( tooltipTitle );
	}

	return TOOLTIP_DESC_MAP[tooltipTitleParsed];
}
/*** Utility to get product tooltip description ***/

