jQuery.fn.center = function (position) { this.css("position",(typeof position=='undefined' ? "absolute":position)); var top = (($(window).height() - $(this).outerHeight()) / 2) + $(window).scrollTop(); var left = (($(window).width() - $(this).outerWidth()) / 2) + $(window).scrollLeft(); // top can be negative on mobile devices -- in which case set top statically //alert($(window).height() + " " + $(this).outerHeight() + " " + $(window).scrollTop()); if (top < 0) { top = 40; } this.css("top", top+"px"); this.css("left", left+"px"); return this; } jQuery.fn.animateElement = function (animate, runAfterEffect) { if(typeof runAfterEffect != 'function') { runAfterEffect = function(){} } switch (animate){ case 'up': case 'right': case 'down': case 'left': this.show( "slide", {direction: animate }, 1000 ); break; default: this.fadeIn(); break; } runAfterEffect(); return this; } var additionalData = {impressionId:null, splitId:splitId}; console.log(additionalData); var img = ''; var showName = 0; if(showName==0){ jQuery("#overLay input[name=name]").remove(); } var linkSettings = {"utm":{"campaign":"","source":"","medium":"","content":"","term":""},"popupSettings":"popupTimed","min":"0","sec":"10","mobileTraffic":"","exitTrafficUrl":"","exitTrafficText":"","geoTargetingAllow":[""],"geoTargetingDeny":[""],"geoTargetingUrl":"http:\/\/","duplicateTraffic":{"campaign":"0","url":""},"trackingCode":"\r\n