function AnypopupInit(popupData){this.popupData=popupData;this.shortcodeInPopupContent();this.reopenPopupAfterSubmission();} AnypopupInit.prototype.reopenPopupAfterSubmission=function(){var that=this;var reopenSubmission=this.popupData['reopenAfterSubmission'];var currentPopupId=this.popupData['id'];ANYPOPUP.deleteCookie('anypopupSubmitReloadingForm');if(reopenSubmission){jQuery("#anypopupcboxLoadedContent form").submit(function(){ANYPOPUP.setCookie('anypopupSubmitReloadingForm',currentPopupId);});}};AnypopupInit.prototype.shortcodeInPopupContent=function(){jQuery(".anypopup-show-popup").bind('click',function(){var anypopupID=jQuery(this).attr("data-anypopuppopupid");var anypopupInsidePopup=jQuery(this).attr("insidepopup");if(typeof anypopupInsidePopup=='undefined'||anypopupInsidePopup!='on'){return false;} jQuery.anypopupcolorbox.close();jQuery('#anypopupcolorbox').bind("anypopupClose",function(){if(anypopupID==''){return;} var anypopupPoupFrontendObj=new ANYPOPUP();anypopupPoupFrontendObj.showPopup(anypopupID,false);anypopupID='';});});};AnypopupInit.prototype.overallInit=function(){jQuery('.anypopup-popup-close').bind('click',function(){jQuery.anypopupcolorbox.close();});if(jQuery('#anypopup-facebook-like').length&&typeof FB!=='undefined'){FB.XFBML.parse();}};AnypopupInit.prototype.initByPopupType=function(){var data=this.popupData;var popupObj={};var popupType=data['type'];var popupId=data['id'];switch(popupType){case'countdown':var popupObj=new ANYPOPUPCountdown();popupObj.init();break;case'contactForm':popupObj=new AnypopupContactForm(popupId);popupObj.buildStyle();break;case'social':popupObj=new AnypopupSocialFront();popupObj.init();break;case'subscription':popupObj=new AnypopupSubscription();popupObj.init();break;case'ageRestriction':popupObj=new ANYPOPUPAgeRestriction();popupObj.setPopupId(popupId);popupObj.init();break;} return popupObj;};