$(document).ready(function() { $('#headerZone .greetingPhoto').remove(); $("#ajaxHeaderLoad").load("/userfiles2/skin/makeWebFromFacebookPage/jsp/ajaxHeader.jsp?clubId=37612", function() { /* ปุ่มกดปิด Search */ $('#searchInMenuBtn').closest('a').click(function() { $('#openSearch').slideDown( "slow", function() { // Animation complete }); }); if($('body #fixedHeader').css('position')!= 'fixed'){ /* BEGIN: script fix show/hide */ $('div#containerBodyAll.showTools').parents('body').addClass("backendShowTools"); $('div#containerBodyAll.showTools').parents('body').removeClass("backendHideTools"); function hideShopTools() { dojo.byId('containerBodyAll').className = 'hideTools'; $('body').addClass("backendHideTools"); $('body').removeClass("backendShowTools"); $('#floatMenu').fadeOut('slow', function() {}); scrollBackgroundHeader(); } function showShopTools() { dojo.byId('containerBodyAll').className = 'showTools'; $('#floatMenu').fadeIn('slow', function() {}); $('body').addClass("backendShowTools"); $('body').removeClass("backendHideTools"); scrollBackgroundHeader(); } /* END: script fix show/hide */ /* Begin: Float Menu */ $(window).scroll(scrollBackgroundHeader); function scrollBackgroundHeader() { var scrollTopPostion = $(window).scrollTop(); var backendMode = false; var maxTopPostion = 60; var positionY = 0; if ($("body.backendShowTools").length > 0) { backendMode = true; positionY = 84; /* when backendMode position Y + 84px*/ } else if ($("body.backendHideTools").length > 0) { backendMode = true; positionY = 20; /* when backendMode position Y + 20px*/ } if ( scrollTopPostion >= maxTopPostion) { if ($('body.scrollTop100').length < 1) { $('body').addClass('scrollTop100'); if ( $('#overideScrollTop100').length <= 0 ) { $("").appendTo("body"); } } } else { if ($('body.scrollTop100').length > 0) { $('body').removeClass('scrollTop100'); } } } /* END: Float Menu */ } }); $("#editZone2.ajaxDinamicLoad > .logo2 > a").html(''); $("#ajaxHeaderSlideLoad").load('/userfiles2/skin/makeWebFromFacebookPage/jsp/headerImage.jsp?clubId=37612', function(){ }); /* ใส่ปุ่มสั่งซื้อผ่าน line + messenger */ $('body.homePage p.productPrice, body.category-view p.productPrice, body.product-search p.productPrice').append('