/**
*Global variables
*/
var windowProxy;
var servicebarProxy;
var frameRetObj;
var brandRightSideBarHeight;
var servicebarLoadCallbacks=[];
var servicebarLoaded=false;
var servicebarHeight=96;
var dynamicInfoLoadCallbacks=[];
var dynamicInfoLoaded=false;
var serviceBarListeners=[];
/*****Scripts to be run in Page load*****/
(function(){
/*Dynamic Viewport Metatag Inclusion*/
if(SiteGlobalObj.windowType=='hcpFirst'||SiteGlobalObj.windowType=='brandPage'||SiteGlobalObj.windowType=='servicePopup'||SiteGlobalObj.windowType=='isi'||SiteGlobalObj.windowType=='microsite'){
if(SiteGlobalObj.isResponsive && DeviceTypes.mobile==getDeviceTypeTemp()){
$('head').append('');
}else{
$('head').append('');
}
}
/*Initialize Responsive Master Object*/
ResponsiveObj.init();
ResponsiveObj.assignTask({action:{
'default':function(){
if(SiteGlobalObj.windowType=='hcpFirst'){
}else if(SiteGlobalObj.windowType=='serviceBar'){
}else if(SiteGlobalObj.windowType=='servicePopup'){
}else if(SiteGlobalObj.windowType=='brandPage'){
/*Don't allow any brand page to be accessed via'/s' URL*/
if(location.hostname.indexOf('sitepreview')==-1 && location.pathname.indexOf('/s/')==0){location.href='/pagenotfound';}
}else if(SiteGlobalObj.windowType=='pageFragment'){
var urlFragments=new RegExp('^(.*)/tabs(/[^/]*)(/.*)$').exec(location.pathname);/*capturing groups 1:site 2:page 3:tab*/
location.replace(urlFragments[1]+urlFragments[2]+'?tab='+encodeURIComponent(location.pathname));
}
if(SiteGlobalObj.RedirectionObj && SiteGlobalObj.RedirectionObj.url && SiteGlobalObj.RedirectionObj.url['default']){
window.location=SiteGlobalObj.RedirectionObj.url['default'];
}
},
'mobile':function(){
if(SiteGlobalObj.windowType=='hcpFirst'){
if(ResetPasswordObj.getResetPwdParam()){
$('head').prepend('');
}
}else if(location.pathname.toLowerCase().indexOf('quodservicehome')!=-1){
if(getParam('serviceName') || ResetPasswordObj.getResetPwdParam()){
$('head').prepend('');
}
}else if(SiteGlobalObj.windowType=='servicePopup'){
}else if(SiteGlobalObj.windowType=='brandPage'){
/*Don't allow any brand page to be accessed via'/s' URL*/
if(location.hostname.indexOf('sitepreview')==-1 && location.pathname.indexOf('/s/')==0){location.href='/pagenotfound';}
if(getParam('serviceName') || ResetPasswordObj.getResetPwdParam()){
$('head').prepend('');
}
}
if(SiteGlobalObj.RedirectionObj && SiteGlobalObj.RedirectionObj.url && SiteGlobalObj.RedirectionObj.url.mobile){
window.location=SiteGlobalObj.RedirectionObj.url.mobile;
}
}
}});
if(SiteGlobalObj.windowType=='brandPage' || SiteGlobalObj.windowType=='hcpFirst'){
$('body').attr('id',location.pathname.substring(location.pathname.lastIndexOf( '/' )+1)+'-page');
}
/*Fetch Dynamic Info from Force.com e.g. mapcode*/
if(SiteGlobalObj.windowType=='isi' || SiteGlobalObj.windowType=='brandPage' || SiteGlobalObj.windowType=='hcpFirst'){
$('head').append('