var loadTemplates = function() { //loadHeader('/doforms/common/banner.htm'); //loadNav('/doforms/common/nav.htm'); // Load body var landpage = window.location.href.slice(window.location.href.indexOf('pid=') + 4); if (landpage.indexOf("&") != -1) { landpage = landpage.substring(0, landpage.indexOf("&")); } if("free-order-new" != landpage) { loadHeader('/doforms/common/header.htm'); } // split paid into 2 page (not my idea) var kind = ""; if(window.location.href.indexOf('kind=') > 0) { kind = window.location.href.slice(window.location.href.indexOf('kind=') + 5); if (kind.indexOf("&") != -1) { kind = kind.substring(0, kind.indexOf("&")); } } if(kind != "") { if(kind == "1") { loadContent('/doforms/purchase/new/professional-order.htm'); } else if(kind == "2") { loadContent('/doforms/purchase/new/dispatch-order.htm'); } firstCallChangePrice(kind); } else { loadContent('/doforms/purchase/new/' + landpage + '.htm'); } if("free-order-new" != landpage) { loadFooter('/doforms/common/footer.htm'); } if("free-order-new" == landpage) { //$('header#stretch-header1').css(CONST_CSS_KEY_DISPLAY,CONST_VALUE_NONE); $('div.container').css(CONST_CSS_KEY_DISPLAY,CONST_VALUE_NONE); $('div.container').addClass('container25');; $('header#stretch-header1').css(CONST_CSS_KEY_DISPLAY,CONST_VALUE_NONE); $(window).on('load', function () { //$('header#stretch-header1 div.header div.center_menu').empty(); $('div.container div#signup_title').empty(); $('div.container div.span-7').empty(); //$('header#stretch-header1').css(CONST_CSS_KEY_DISPLAY,''); $('div.container').css(CONST_CSS_KEY_DISPLAY,''); }); } }; var firstCallChangePrice = function(kind) { if($('#submitForm1').length < 1) { setTimeout(function() { firstCallChangePrice(kind); } ,1000 ) return; } if(kind == "1") { $('#submitForm2 input.CAT_Custom_164252_P').click(); } else if(kind == "2") { $('#submitForm2 input.CAT_Custom_164252_D').click(); } changePrice(); } var loadHeader = function(page) { //$('#stretch-header').load(page); $('header#stretch-header1').load(page); }; //var loadNav = function(page) { // $('#stretch-nav').load(page); //}; var loadContent = function(page) { $('#container-content').load(page); }; var loadFooter = function(page) { $('#stretch-footer').load(page); }; loadTemplates();