function omnitureStripCharacters(input) { var ret = input.replace(/\&\w+;|%\d{2}|[^A-Za-z0-9\s.&]/gi, ''); ret = ret.replace(/&/gi, 'and'); ret = ret.toLowerCase(); return ret; } var s_account = 'musicartsprod'; var omnitureInternalFilters = 'javascript:,musicarts.com,www.musicarts.com'; $.urlParam = function(name){ var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); if(results != null && results.length > 0) { return results[1]; } else { return ''; } } function getOmnitureCookie(name) { var nameEQ = name + '='; var ca = document.cookie.split(';'); for (var i = 0; i < ca.length; i++) { var c = ca[i]; while (c.charAt(0) == ' ') c = c.substring(1, c.length); if (c.indexOf(nameEQ) == 0) { return $.trim(c.substring(nameEQ.length, c.length).toLowerCase()); } } return ''; } function setOmnitureCookie(name,value) { document.cookie=name + '=' + escape(value); } function getOmnitureSourceCode() { var source = ''; var history = ''; var urlSource = ''; urlSource = $.urlParam('source'); if (urlSource != null && urlSource != '') { source = urlSource; } else if (getOmnitureCookie('source') != '') { source = getOmnitureCookie('source'); } if (getOmnitureCookie('source_history') != '') { history = getOmnitureCookie('source_history'); } if( (!history.length && source.length) || history.indexOf(source) == -1) { setOmnitureCookie('source_history', $.trim(history + ' ' + source)); return source; } else { return ''; } } var omnitureCampaign = ''; if(typeof getOmnitureSourceCode != 'undefined') omnitureCampaign = omnitureStripCharacters(getOmnitureSourceCode());