var WODHOPPER_JQUERY; var WODHOPPER_PLUGIN = function() {}; /* * Variables */ // WODHOPPER_PLUGIN.prototype.BASE_DOMAIN = "https://syncapp.wodhopper.com/"; WODHOPPER_PLUGIN.BASE_DOMAIN = "https://syncapp.wodhopper.com/"; //Must strip out the final slash for the XSS to properly resolve to the host. WODHOPPER_PLUGIN.XSS_BASE_DOMAIN = WODHOPPER_PLUGIN.BASE_DOMAIN.substring(0,WODHOPPER_PLUGIN.BASE_DOMAIN.length-1); WODHOPPER_PLUGIN.TAB_COLOR = ""; WODHOPPER_PLUGIN.parent_url = function() { var split_url = window.location.href.split("/"); //splitting http://xxx.com results in [0]=http: [1]='' [2]=restOfBaseUrl return split_url[0] + "//" + split_url[2]; }; WODHOPPER_PLUGIN.getIsMobile = function() { var isMobile = false; //check for specific versions if(/Android/i.test(navigator.userAgent)){ WODHOPPER_PLUGIN.isAndroid = true; isMobile = true; } else if(/iPhone/i.test(navigator.userAgent) || /iPod/i.test(navigator.userAgent)){ WODHOPPER_PLUGIN.isIPhone = true; isMobile = true; } else if(/iPad/i.test(navigator.userAgent)){ WODHOPPER_PLUGIN.isIPad = true; } else if(/Blackberry/i.test(navigator.userAgent)){ WODHOPPER_PLUGIN.isBlackBerry = true; isMobile = true; } else{ //check for IEMobile Phones if(/IEMobile|Opera Mini|Opera Mobi|Fennec/i.test(navigator.userAgent)){ isMobile = true; } } return isMobile; }; WODHOPPER_PLUGIN.getScriptParams = function(regEx) { var scripts = document.getElementsByTagName('script'); for( var i = 0; i < scripts.length; i++ ){ if(regEx.test(scripts[i].src)){ return true; } } return false; }; WODHOPPER_PLUGIN.getScriptParam = function(regEx,param) { var scripts = document.getElementsByTagName('script'); for( var i = 0; i < scripts.length; i++ ){ if(regEx.test(scripts[i].src)){ var split = scripts[i].src.split(""+param+"="); if(split[1] !== "" && split[1] !== undefined){ return split[1]; } else{ return ""; } } } return ""; }; WODHOPPER_PLUGIN.hexToRgb = function(hex) { var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); return result ? { r: parseInt(result[1], 16), g: parseInt(result[2], 16), b: parseInt(result[3], 16) } : null; }; //checks for any for of empty input, including just white space WODHOPPER_PLUGIN.isEmptyInput = function(input) { if(input) { //could still be just white space input = input.trim(); if(input) { return false; } } return true; } WODHOPPER_PLUGIN.getScriptGymId = function() { //all this just gets the gymId and returns null //if it is any form of empty input var scriptGymId = null; if(WODHOPPER_PLUGIN.getScriptParams(/gymId/i) == true){ scriptGymId = WODHOPPER_PLUGIN.getScriptParam(/gymId/i,"gymId"); } if(!WODHOPPER_PLUGIN.isEmptyInput(scriptGymId)) { return scriptGymId; } else { return null; } }; WODHOPPER_PLUGIN.getScriptGymIdParamToAppend = function() { var scriptGymId = WODHOPPER_PLUGIN.getScriptGymId(); if(scriptGymId) { return "&gymId="+scriptGymId; } else { return ""; } }; WODHOPPER_PLUGIN.MOBILE_FILE = ""; WODHOPPER_PLUGIN.DESKTOP_FILE = ""; //if no scriptGymId it will append "" WODHOPPER_PLUGIN.ROOT_PARAM = "xd="+WODHOPPER_PLUGIN.parent_url()+WODHOPPER_PLUGIN.getScriptGymIdParamToAppend(); WODHOPPER_PLUGIN.MOBILE_URL = WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.MOBILE_FILE + "?"+WODHOPPER_PLUGIN.ROOT_PARAM; WODHOPPER_PLUGIN.isBlackBerry = false; WODHOPPER_PLUGIN.isIPhone = false; WODHOPPER_PLUGIN.isAndroid = false; WODHOPPER_PLUGIN.isIPad = false; WODHOPPER_PLUGIN.firstTimeSession = 0; WODHOPPER_PLUGIN.isMobile = WODHOPPER_PLUGIN.getIsMobile(); WODHOPPER_PLUGIN.mobileTabs = (WODHOPPER_PLUGIN.getScriptParams(/mobileTabs/i) === true); WODHOPPER_PLUGIN.firstTimeSession = 0; WODHOPPER_PLUGIN.rootUrl = WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE +"?"+WODHOPPER_PLUGIN.ROOT_PARAM; //Another function needed for the third party cookie workaround in safari WODHOPPER_PLUGIN.emptyFunction = function(){ var x=0; //this is a placeholder method that just needs to be executed }; //Function for Safari iFrame 3rd party cookies workaround WODHOPPER_PLUGIN.submitSessionForm = function() { if (WODHOPPER_PLUGIN.firstTimeSession === 0) { WODHOPPER_PLUGIN.firstTimeSession = 1; WODHOPPER_JQUERY("#wodsessionform").submit(); setTimeout(WODHOPPER_PLUGIN.emptyFunction,2000); } }; WODHOPPER_PLUGIN.openMobileSite = function(tabToOpen,isRedirect,verificationLink,isOneStep,locale){ //add in a brief check for the ability to open new windows. This is for the new //auto open scoreboard from facebook feature. The window object may not be fully loaded //and unable to 'open' a new window. If thats the case set a minor timeout (3sec) //and re-try if(verificationLink != undefined && verificationLink != ""){ if(WODHOPPER_PLUGIN.TAB_COLOR != undefined && WODHOPPER_PLUGIN.TAB_COLOR != ""){ verificationLink += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } window.open(verificationLink); }else if(isRedirect !==undefined && isRedirect === true){ var theUrl = WODHOPPER_PLUGIN.MOBILE_URL+"&mobileTab=" + tabToOpen; if(WODHOPPER_PLUGIN.TAB_COLOR != undefined && WODHOPPER_PLUGIN.TAB_COLOR != ""){ theUrl += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } window.location = theUrl + "#ignoreCookie=true"; } else{ if(tabToOpen.indexOf('scoreboard') != -1){ var theDate = tabToOpen.substring(tabToOpen.indexOf("=")+1); if( theDate!= undefined && theDate.match(/^([0]?[1-9]|[1][0-2])[./-]([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]([0-9]{4}|[0-9]{2})$/g) != null){ if(theDate.indexOf("MM/DD/YYYY") ==-1 && theDate.indexOf("mm/dd/yyyy") ==-1){ WODHOPPER_PLUGIN.MOBILE_URL += "&scoreboard-date="+theDate; } else{ //this is plain MM/DD/YYYY WODHOPPER_PLUGIN.MOBILE_URL += "&scoreboard-date=today"; } } else{ //this is plain MM/DD/YYYY WODHOPPER_PLUGIN.MOBILE_URL += "&scoreboard-date=today"; } } else if(tabToOpen.indexOf('signupMenuItem') != -1){ if(tabToOpen.indexOf('NoRsvp') != -1){ WODHOPPER_PLUGIN.MOBILE_URL += "&signup=SignupNoRsvp"; } else{ WODHOPPER_PLUGIN.MOBILE_URL += "&signup=Signup"; if ( isOneStep ) { WODHOPPER_PLUGIN.MOBILE_URL += "&onestep=true"; } } } else if(tabToOpen.indexOf('rsvpMenuItem') != -1){ WODHOPPER_PLUGIN.MOBILE_URL += "&rsvp=true"; } else if(tabToOpen.indexOf('calculatorMenuItem') != -1){ WODHOPPER_PLUGIN.MOBILE_URL += "&calc=true"; } else{ WODHOPPER_PLUGIN.MOBILE_URL += ""; } if(WODHOPPER_PLUGIN.TAB_COLOR != undefined && WODHOPPER_PLUGIN.TAB_COLOR != ""){ WODHOPPER_PLUGIN.MOBILE_URL += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } //window.open(WODHOPPER_PLUGIN.MOBILE_URL,'WODHOPPER Mobile'); if (locale) { WODHOPPER_PLUGIN.MOBILE_URL += "&locale="+locale } window.open(WODHOPPER_PLUGIN.MOBILE_URL,'_blank'); } }; WODHOPPER_PLUGIN.updateIFrameSize = function(){ var iFrameHeight = 670; if((WODHOPPER_JQUERY(window).height()*0.70) >= iFrameHeight){ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").height((WODHOPPER_JQUERY(window).height()*.90)); } else{ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").height(iFrameHeight); } WODHOPPER_PLUGIN.positionIframe(); }; WODHOPPER_PLUGIN.positionIframe = function(){ if(WODHOPPER_JQUERY(window).width() > 1100){ //center it var newLeft = WODHOPPER_JQUERY(window).width() - WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe').width(); newLeft = newLeft/2; newLeft = newLeft - (newLeft/3); WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe,.wh-root-level-overlay').css('left',newLeft); WODHOPPER_JQUERY('.close-image').css('left',newLeft + WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe').width() -8); }else { WODHOPPER_JQUERY('.close-image').css('left',WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe').position().left + WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe').width() - 5); } } WODHOPPER_PLUGIN.GET_GYM_LOGO_URL = function(url){ //trim the XD out of the url var xd = ""; var domain = ""; if(url.indexOf("xd=") != -1){ var subXd = url.substring(url.indexOf("xd=")+3); var hashIndex = 0; var ampIndex = 0; if(subXd.indexOf("&") != -1){ ampIndex = subXd.indexOf("&"); } if(subXd.indexOf("#") != -1){ hashIndex = subXd.indexOf("#"); } if(hashIndex != 0 && ampIndex != 0 && hashIndex < ampIndex){ domain = subXd.substring(0,hashIndex); } else if(ampIndex != 0 && hashIndex != 0 && ampIndex < hashIndex){ domain = subXd.substring(0,ampIndex); } else if(ampIndex != 0 && hashIndex == 0){ domain = subXd.substring(0,ampIndex); } else if(hashIndex != 0 && ampIndex == 0){ domain = subXd.substring(0,hashIndex); } else{ return "https://syncapp.wodhopper.com/css/images/app-icon-med.png"; } domain = domain.replace(/http:/ig,""); domain = domain.replace(/www\./ig,""); domain = domain.replace(/\//ig,""); domain = domain.replace(/\.com/ig,""); domain = domain.replace(/\.net/ig,""); domain = domain.replace(/\.ca/ig,""); domain = domain.replace(/\.au/ig,""); domain = domain.replace(/\./ig,"_"); domain = domain.replace(/:/ig,"_"); return "https://s3.amazonaws.com/app.wodhopper.com/logos/"+domain+"_home_icon.png"; } }; WODHOPPER_PLUGIN.buildWodhopperIframe = function (tabName,directedUrl,isOneStep,locale){ //reset the root URL WODHOPPER_PLUGIN.rootUrl = WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE +"?"+WODHOPPER_PLUGIN.ROOT_PARAM; if ( isOneStep ) { WODHOPPER_PLUGIN.rootUrl += "&onestep=true"; } if ( locale ) { WODHOPPER_PLUGIN.rootUrl += "&locale=" + locale; } //add iframe if(tabName.indexOf('Scoreboard') != -1){ var theDate = tabName.substring(tabName.indexOf("=")+1); if( theDate!= undefined && theDate.match(/^([0]?[1-9]|[1][0-2])[./-]([0]?[1-9]|[1|2][0-9]|[3][0|1])[./-]([0-9]{4}|[0-9]{2})$/g) != null){ if(theDate.indexOf("MM/DD/YYYY") ==-1 && theDate.indexOf("mm/dd/yyyy") ==-1){ if(WODHOPPER_PLUGIN.isOnlySafari() && WODHOPPER_PLUGIN.TAB_COLOR != ""){ WODHOPPER_PLUGIN.rootUrl += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } WODHOPPER_PLUGIN.rootUrl += "#scoreboard-date="+theDate; } else{ //this is plain MM/DD/YYYY if(WODHOPPER_PLUGIN.isOnlySafari() && WODHOPPER_PLUGIN.TAB_COLOR != ""){ WODHOPPER_PLUGIN.rootUrl += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } WODHOPPER_PLUGIN.rootUrl += "#scoreboard-date=today"; } } else{ //this is plain MM/DD/YYYY if(WODHOPPER_PLUGIN.isOnlySafari() && WODHOPPER_PLUGIN.TAB_COLOR != ""){ WODHOPPER_PLUGIN.rootUrl += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } WODHOPPER_PLUGIN.rootUrl += "#scoreboard-date=today"; } } else if(tabName.indexOf('RSVP') != -1){ if(WODHOPPER_PLUGIN.isOnlySafari() && WODHOPPER_PLUGIN.TAB_COLOR != ""){ WODHOPPER_PLUGIN.rootUrl += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } WODHOPPER_PLUGIN.rootUrl += "#rsvp"; } else if(tabName.indexOf('Signup') != -1){ if(tabName.indexOf('NoRsvp') != -1){ WODHOPPER_PLUGIN.rootUrl += "&signup=SignupNoRsvp"; } else{ WODHOPPER_PLUGIN.rootUrl += "&signup=Signup"; } } else{ WODHOPPER_PLUGIN.rootUrl += ""; } var iframeSource = WODHOPPER_PLUGIN.rootUrl; if(directedUrl != undefined && directedUrl != ""){ iframeSource = directedUrl; } //check for passing in colors if(WODHOPPER_PLUGIN.TAB_COLOR != ""){ //check for the Signup auto-open if(iframeSource.indexOf("signup") != -1){ iframeSource += "&customColor="+WODHOPPER_PLUGIN.TAB_COLOR; } else{ iframeSource += "#color="+WODHOPPER_PLUGIN.TAB_COLOR; } WODHOPPER_PLUGIN.LOGO_URL = WODHOPPER_PLUGIN.GET_GYM_LOGO_URL(iframeSource); } else{ WODHOPPER_PLUGIN.TAB_COLOR = "5eadde"; WODHOPPER_PLUGIN.LOGO_URL = "https://syncapp.wodhopper.com/css/images/app-icon-med.png"; } WODHOPPER_JQUERY('').appendTo(document.body); WODHOPPER_JQUERY('
').appendTo(document.body); WODHOPPER_JQUERY('.wh-root-level-overlay').html("Loading..."); WODHOPPER_JQUERY('.wh-root-level-overlay').css('-webkit-box-shadow',' inset 0px 0px 60px 20px #' + WODHOPPER_PLUGIN.TAB_COLOR); WODHOPPER_JQUERY('.wh-root-level-overlay').css('box-shadow','inset 0px 0px 60px 20px #' + WODHOPPER_PLUGIN.TAB_COLOR); WODHOPPER_JQUERY('.wh-root-level-overlay').css("background","#fff url('" + WODHOPPER_PLUGIN.LOGO_URL + "') no-repeat center 40%"); WODHOPPER_JQUERY('.wh-root-level-overlay').css("background-size","40%"); //add overlay //WODHOPPER_JQUERY('').appendTo(document.body); //add close image WODHOPPER_JQUERY("").appendTo(document.body); WODHOPPER_JQUERY(".close-image").show().click(WODHOPPER_PLUGIN.closeWodhopperItems); WODHOPPER_JQUERY(".close-image").css('position','absolute'); WODHOPPER_JQUERY(".close-image").css('top',(WODHOPPER_JQUERY(document).scrollTop() +49)); WODHOPPER_JQUERY(".close-image").css('left',120 + WODHOPPER_JQUERY(".wh-root-level-overlay").width()); WODHOPPER_JQUERY(".close-image").css('z-index','999999999999999999'); WODHOPPER_JQUERY(".close-image").css('cursor','pointer'); WODHOPPER_JQUERY(".close-image").css('display','inline-block'); WODHOPPER_PLUGIN.updateIFrameSize(); setTimeout(function(){ WODHOPPER_JQUERY('.wh-root-level-overlay').hide(); },1200); WODHOPPER_JQUERY(WODHOPPER_JQUERY('#wodhopper_modal_dialog_iframe')[0].document).ready(function() { setTimeout(function(){ WODHOPPER_JQUERY('.wh-root-level-overlay').hide(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").show(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").css('box-shadow','0px 0px 34px #888888'); WODHOPPER_PLUGIN.TAB_COLOR = ""; },1200); }); }; WODHOPPER_PLUGIN.closeWodhopperItems = function(){ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe,.close-image,.wh-root-level-overlay").remove(); if(WODHOPPER_PLUGIN.getScriptParams(/tabColor/i) == true){ var color = WODHOPPER_PLUGIN.getScriptParam(/tabColor/i,"tabColor"); if(color!==""){ if(color.length > 6){ color = color.substring(0,6); } WODHOPPER_PLUGIN.TAB_COLOR = color; } } } WODHOPPER_PLUGIN.openModalDialog = function(tabName) { if(WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").length === 0){ WODHOPPER_PLUGIN.buildWodhopperIframe(tabName); } else if(WODHOPPER_PLUGIN.isIPad){ //do nothing. } else{ if(!WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").is(':visible')){ WODHOPPER_PLUGIN.updateIFrameSize(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").show(); } else{ //close the dialog WODHOPPER_JQUERY('.close-image').trigger('click'); } //WODHOPPER_JQUERY(".close-image").css('top',WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").offset().top - 6); // WODHOPPER_JQUERY.postMessage( // tabName, // WODHOPPER_PLUGIN.rootUrl, // WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").get(0).contentWindow // ); } return false; }; WODHOPPER_PLUGIN.openVerificationLink = function(directedUrl){ if(WODHOPPER_PLUGIN.isMobile || WODHOPPER_PLUGIN.isIPad){ WODHOPPER_PLUGIN.openMobileSite("","",directedUrl); } else{ WODHOPPER_PLUGIN.buildWodhopperIframe("",directedUrl); } } WODHOPPER_PLUGIN.showLeaderboardOnDate = function(dateString,isRedirect){ if(dateString === undefined || dateString === ""){ var currentDate = new Date(); var day = currentDate.getDate(); var month = currentDate.getMonth() + 1; var year = currentDate.getFullYear(); dateString = "" + month+"/"+day+"/"+year; } //now make sure the future dated scoreboards arent allowed var currentDate = new Date(); var passedInDate = new Date(dateString); if(passedInDate > currentDate){ var day = currentDate.getDate(); var month = currentDate.getMonth() + 1; var year = currentDate.getFullYear(); dateString = "" + month+"/"+day+"/"+year; } if(WODHOPPER_PLUGIN.isMobile){ WODHOPPER_PLUGIN.openMobileSite("scoreboardMenuItem&gotoDate="+dateString,isRedirect); } else if(WODHOPPER_PLUGIN.isIPad){ window.open(WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE + "?"+WODHOPPER_PLUGIN.ROOT_PARAM+"#scoreboard-date="+dateString,'WODHOPPER'); }else{ if(WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").length === 0){ WODHOPPER_PLUGIN.buildWodhopperIframe("Scoreboard&gotoDate="+dateString); } else{ if(!WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").is(':visible')){ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").show(); } WODHOPPER_PLUGIN.updateIFrameSize(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").css('top',WODHOPPER_JQUERY(document).scrollTop() +50); WODHOPPER_JQUERY.postMessage( dateString, WODHOPPER_PLUGIN.rootUrl, WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").get(0).contentWindow ); } } }; WODHOPPER_PLUGIN.showRsvp = function(){ if(WODHOPPER_PLUGIN.isMobile){ WODHOPPER_PLUGIN.openMobileSite("rsvpMenuItem"); } else if(WODHOPPER_PLUGIN.isIPad){ window.open(WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE + "?"+WODHOPPER_PLUGIN.ROOT_PARAM,'WODHOPPER'); } else{ if(WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").length === 0){ WODHOPPER_PLUGIN.buildWodhopperIframe("RSVP"); } else{ if(!WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").is(':visible')){ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").show(); } WODHOPPER_PLUGIN.updateIFrameSize(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").css('top',WODHOPPER_JQUERY(document).scrollTop() +50); WODHOPPER_JQUERY.postMessage( 'RSVP', WODHOPPER_PLUGIN.rootUrl, WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").get(0).contentWindow ); } } }; WODHOPPER_PLUGIN.isOnlySafari = function(){ if(/Safari/.test(navigator.userAgent) && !(/Chrome/.test(navigator.userAgent))){ return true; } else{ return false; } }; WODHOPPER_PLUGIN.showSignup = function(skipRsvp, isOneStep, locale){ if(WODHOPPER_PLUGIN.isMobile){ if(skipRsvp===true){ WODHOPPER_PLUGIN.openMobileSite("signupMenuItemNoRsvp",null,null,true,locale); } else{ if ( isOneStep ) { WODHOPPER_PLUGIN.openMobileSite("signupMenuItem","","",true,locale); } else { WODHOPPER_PLUGIN.openMobileSite("signupMenuItem",null,null,null,locale); } } } else if(WODHOPPER_PLUGIN.isIPad){ if(skipRsvp===true){ window.open(WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE + "?"+WODHOPPER_PLUGIN.ROOT_PARAM +"&signup=SignupNoRsvp",'WODHOPPER'); } else{ window.open(WODHOPPER_PLUGIN.BASE_DOMAIN+ WODHOPPER_PLUGIN.DESKTOP_FILE + "?"+WODHOPPER_PLUGIN.ROOT_PARAM +"&signup=Signup",'WODHOPPER'); } } else{ if(WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").length === 0){ if(skipRsvp===true){ WODHOPPER_PLUGIN.buildWodhopperIframe("SignupNoRsvp",null,null,locale); } else{ if ( isOneStep ) { WODHOPPER_PLUGIN.buildWodhopperIframe("Signup", "", true,locale); } else { WODHOPPER_PLUGIN.buildWodhopperIframe("Signup", null, null, locale); } } } else{ if(!WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").is(':visible')){ WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").show(); } WODHOPPER_PLUGIN.updateIFrameSize(); WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").css('top',WODHOPPER_JQUERY(document).scrollTop() +50); WODHOPPER_JQUERY.postMessage( 'Signup', WODHOPPER_PLUGIN.rootUrl, WODHOPPER_JQUERY("#wodhopper_modal_dialog_iframe").get(0).contentWindow ); } } }; WODHOPPER_PLUGIN.html_doc = document.getElementsByTagName('head').item(0); WODHOPPER_PLUGIN.script = document.createElement("script"); WODHOPPER_PLUGIN.script2 = document.createElement("script"); WODHOPPER_PLUGIN.cssFile=document.createElement("link"); /* * Dynamic JQuery and other JS and CSS files */ WODHOPPER_PLUGIN.cssFile.setAttribute("rel", "stylesheet"); WODHOPPER_PLUGIN.cssFile.setAttribute("type", "text/css"); WODHOPPER_PLUGIN.cssFile.setAttribute("href", WODHOPPER_PLUGIN.BASE_DOMAIN+"css/plugins/feedbackBadge.css"); WODHOPPER_PLUGIN.html_doc.appendChild(WODHOPPER_PLUGIN.cssFile); WODHOPPER_PLUGIN.script.type = "text/javascript"; WODHOPPER_PLUGIN.callback_function = function() { //10/1/11 - Adding noConflict call due to the jQuery conflicitng with MooTools. Found //when deploying CF Barrington (Forging Elite Websites) WODHOPPER_JQUERY = jQuery.noConflict(true); if(!WODHOPPER_PLUGIN.isBlackBerry){ if(WODHOPPER_PLUGIN.isOnlySafari()){ //this is safari. 3rd party cookies fix. //This is the iFrame 3rd Party cookies in Safari workaround. //Reference http://anantgarg.com/2010/02/18/cross-domain-cookies-in-safari/ WODHOPPER_JQUERY("body").append(''); } if(WODHOPPER_PLUGIN.getScriptParams(/hideWHTabs/i) !== true){ //append the two links for the floating Divs to the end of the HTML body if ((document.documentMode || 100) <= 9) { WODHOPPER_JQUERY('