1/* Credit: http://www.templatemo.com */ 2 3var menuDisabled = false; 4 5jQuery(function($) { 6 7 $(window).load(function() { // makes sure the whole site is loaded 8 $('#status').fadeOut(); // will first fade out the loading animation 9 $('#preloader').delay(350).fadeOut('slow'); // will fade out the white DIV that covers the website. 10 $('#main-wrapper').delay(350).css({'overflow':'visible'}); 11 }); 12 13 $(document).ready( function() { 14 15 loadGoogleMap(); 16 17 // backstretch for background image 18 var defaultImgSrc = $('img.main-img').attr('src'); 19 $.backstretch(defaultImgSrc, {speed: 500}); 20 21 // for responsive-menu 22 $("#m-btn").click(function(){ 23 $("#responsive").toggle(); 24 }); 25 26 // copy menu list to responsive menu 27 var mainMenuList = $('#menu-list').html(); 28 $('#responsive').html(mainMenuList); 29 30 //for image slide on menu item click(normal) and responsive 31 $("#menu-list a, #responsive a").on('click',function(e){ 32 e.preventDefault(); 33 if (menuDisabled == false) // check the menu has disabled? 34 { 35 menuDisabled = true; // disable to menu 36 37 var name = $(this).attr('href'); 38 $('#menu-list li').removeClass('active'); 39 $('#responsive li').removeClass('active'); 40 41 // set active to both menu 42 var menuClass = $(this).parent('li').attr('class'); 43 $('.'+menuClass).addClass('active'); 44 45 // hide responsive menu 46 $("#responsive").hide(); 47 48 // get image url and assign to backstretch for background 49 var imgSrc = $("img"+name+"-img").attr('src'); 50 $.backstretch(imgSrc, {speed: 500}); //backstretch for background fade in/out 51 52 // content slide in/out 53 $("section.active").animate({left:$("section.active").outerWidth()}, 400,function(){ 54 $(this).removeClass("active"); 55 $(this).hide(); 56 $(name+"-text").show(); 57 $(name+"-text").animate({left:'0px'},400,function(){ 58 $(this).addClass("active"); 59 60 google.maps.event.trigger(map, 'resize'); // resize map 61 $.backstretch("resize"); // resize the background image 62 63 menuDisabled = false; // enable the menu 64 }); 65 }); 66 67 } 68 return; 69 }); 70 71 }); 72 73}); 74 75var map = ''; 76 77function initialize() { 78 var mapOptions = { 79 zoom: 14, 80 center: new google.maps.LatLng(16.8461789,96.1309764) 81 }; 82 map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); 83} 84 85function loadGoogleMap(){ 86 // load google map 87 var script = document.createElement('script'); 88 script.type = 'text/javascript'; 89 script.src = 'https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&' + 90 'callback=initialize'; 91 document.body.appendChild(script); 92}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.