1/** 2 * Spin Main JS 3 * Copyright 2017-2018 4 */ 5 6/******************************************************************************************************************* 7 * Globals 8 ********************************************************************************************************************/ 9 10var Main; 11 12/** 13 * Set the settings for the mobile menu. For example: if the menu has to slide from left or from right you can set this with offCanvas position 14 * Logo - if the menu needs a logo you can add this in the slidelogo div 15 * Navbar - height = here you can set the height of the logo area 16 * @type {{extensions: string[], offCanvas: {position: string}, navbars: *[]}} 17 * Documentation and tutorials: http://mmenu.frebsite.nl/documentation/options/ 18 */ 19var imageFolder = $('body').data('folder'); 20var mobilenavVars = { 21 extensions: ['effect-slide-menu', 'shadow-page', 'shadow-panels', 'pagedim-black', 'multiline'], 22 offCanvas: { 23 position: 'right' 24 }, 25 navbars: [ 26 { 27 height: 4, 28 position: 'top', 29 content: [ 30 '<div id="slidelogo"><a href="/"><img src="' + imageFolder + '/logo-wet-and-wild-beach-club-curacao.png"></a></div>', 31 'prev', 32 'title', 33 'close' 34 ] 35 } 36 ] 37}; 38 39/** 40 * Set height for slider at slideHeight. For example $(window).height() or $(document).height() etc etc 41 * Please note that the minus value needs to be set twice 42 */ 43var windowHeight = $(window).height() - 200; 44 45$(window).resize(function() { 46 windowHeight = $(window).height() - 200; 47 Main.divAlignment(); 48}); 49 50Main = { 51 52 /******************************************************************************************************************* 53 * Init actions 54 ********************************************************************************************************************/ 55 56 init: function() { 57 58 Main.bindUIActions(); 59 Main.fixTablesToResponsive(); 60 Main.divAlignment(); 61 Common.initMobileMenu(mobilenavVars); 62 63 }, 64 65 /******************************************************************************************************************* 66 * Functions 67 ********************************************************************************************************************/ 68 69 randomHash: function(pos) { 70 var result = ''; 71 var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 72 var charactersLength = characters.length; 73 for(var i = 0; i < pos; i++ ) { 74 result += characters.charAt(Math.floor(Math.random() * charactersLength)); 75 } 76 return result; 77 }, 78 79 fixTablesToResponsive: function() { 80 if($("table").length) { 81 $("table").each(function() { 82 var rand = Main.randomHash(20); 83 var $table = $(this).clone(); 84 var div = '<div class="make-responsive" id="'+rand+'" style="overflow-x: auto;"></div>'; 85 $(div).insertBefore(this); 86 $($table).appendTo("#"+rand); 87 $(this).remove(); 88 }); 89 } 90 }, 91 92 divAlignment: function () { 93 var subnavHeight = $('.subs .contentcolumn .leftcol').outerHeight(); 94 var superInnerRight = $('.contentcolumn .super-inner.right.use-js'); 95 var superInnerLeft = $('.contentcolumn .super-inner.left.use-js'); 96 var headerMargin = $('.header-container .header').offset(); 97 if ($('.breadcrumbs').length) { 98 var firstElement = $('.subs .contentcolumn .detail-image + .leftcol + .breadcrumbs + .cblock .super-inner'); 99 } else { 100 var firstElement = $('.subs .contentcolumn .detail-image + .leftcol + .cblock .super-inner'); 101 } 102 left = headerMargin.left; 103 if ($(window).width() > 1000) { 104 $(window).load(function () { 105 superInnerRight.delay(300).css('opacity', '1'); 106 superInnerLeft.delay(300).css('opacity', '1'); 107 // $('.page-title').fadeIn(1000); 108 $('.leftcol').delay(300).fadeIn(1000); 109 }); 110 superInnerRight.css('left', left); 111 superInnerLeft.css('right', left); 112 $('.b4headerimage .element-content').css('right', -left); 113 firstElement.css('min-height', subnavHeight + 50); 114 } else { 115 superInnerRight.css('left', 'auto'); 116 superInnerLeft.css('right', 'auto'); 117 $('.b4headerimage .element-content').css('right', '0'); 118 firstElement.css('min-height', 'inherit'); 119 } 120 }, 121 /******************************************************************************************************************* 122 * Listeners 123 ********************************************************************************************************************/ 124 125 bindUIActions: function() { 126 127 $(document).on('click', ".select-language", function(){ 128 if(!$(this).hasClass('text-only')) { 129 $('.languages').stop(true, true).slideToggle(300); 130 $(this).toggleClass('active'); 131 } 132 }); 133 134 } 135 136};
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.