1jQuery(document).ready(function() { 2 var autoplay = 5000; 3 jQuery('.slider-cardapio').slick({ 4 slidesToShow: 1, 5 slidesToScroll: 1, 6 autoplay: true, 7 fade: false, 8 autoplaySpeed: autoplay, 9 arrows: false, 10 dots: true, 11 pauseOnHover: false, 12 appendDots: jQuery('.wrapper-dots>div'), 13 }); 14 15 jQuery('#wrapper-slider-cardapio .slick-dots li:first-child').addClass('activate'); 16 jQuery('.slider-cardapio').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 17 var currentIndex = nextSlide + 1; 18 19 jQuery('#wrapper-slider-cardapio .slick-dots li').each(function( index ) { 20 if(index >= currentIndex){ 21 jQuery('#wrapper-slider-cardapio .slick-dots li:nth-child(' + index + ')').removeClass('activate'); 22 } 23 }); 24 25 setTimeout(function(){ 26 jQuery('#wrapper-slider-cardapio .slick-dots li:nth-child(' + currentIndex + ')').addClass('activate'); 27 }, 1000) 28 }); 29 jQuery('.slider-cardapio').on('afterChange', function (slick, currentSlide){ 30 var currentIndex = parseInt(currentSlide.currentSlide) + 1; 31 32 jQuery('#wrapper-slider-cardapio .slick-dots li:not(.slick-active)').removeClass('activate'); 33 34 jQuery('#wrapper-slider-cardapio .slick-dots li').each(function( index ) { 35 if(index < currentIndex){ 36 jQuery('#wrapper-slider-cardapio .slick-dots li:nth-child(' + index + ')').addClass('activated'); 37 } 38 if(index >= currentIndex){ 39 jQuery('#wrapper-slider-cardapio .slick-dots li:nth-child(' + index + ')').removeClass('activated'); 40 } 41 }); 42 }); 43 jQuery('#featured-page .slick-dots li:first-child').addClass('activate'); 44 jQuery('.slider-restaurantes').on('beforeChange', function(event, slick, currentSlide, nextSlide){ 45 var currentIndex = nextSlide + 1; 46 47 jQuery('#featured-page .slick-dots li').each(function( index ) { 48 if(index >= currentIndex){ 49 jQuery('#featured-page .slick-dots li:nth-child(' + index + ')').removeClass('activate'); 50 } 51 }); 52 53 setTimeout(function(){ 54 jQuery('#featured-page .slick-dots li:nth-child(' + currentIndex + ')').addClass('activate'); 55 }, 1000) 56 }); 57 jQuery('.slider-restaurantes').on('afterChange', function (slick, currentSlide){ 58 var currentIndex = parseInt(currentSlide.currentSlide) + 1; 59 60 jQuery('#featured-page .slick-dots li:not(.slick-active)').removeClass('activate'); 61 62 jQuery('#featured-page .slick-dots li').each(function( index ) { 63 if(index < currentIndex){ 64 jQuery('#featured-page .slick-dots li:nth-child(' + index + ')').addClass('activated'); 65 } 66 if(index >= currentIndex){ 67 jQuery('#featured-page .slick-dots li:nth-child(' + index + ')').removeClass('activated'); 68 } 69 }); 70 }); 71 72 jQuery('.wrapper-slider-especialidades').slick({ 73 slidesToShow: 1, 74 slidesToScroll: 1, 75 autoplay: false, 76 arrows: true, 77 fade: true, 78 dots: false, 79 pauseOnHover: false, 80 appendArrows: jQuery('.wrapper-dots-especialidades .dots'), 81 infinite: false, 82 prevArrow:"<button type='button' class='slick-prev slick-arrow'><i class='bi bi-arrow-left'></i></button>", 83 nextArrow:"<button type='button' class='slick-next slick-arrow'><i class='bi bi-arrow-right'></i></button>", 84 }); 85 86 jQuery('.slide-mobile').slick({ 87 slidesToShow: 1, 88 slidesToScroll: 1, 89 centerMode: true, 90 centerPadding: '20px', 91 autoplay: false, 92 fade: false, 93 autoplaySpeed: autoplay, 94 arrows: true, 95 dots: false, 96 pauseOnHover: false, 97 prevArrow:"<button type='button' class='slick-prev slick-arrow'><i class='bi bi-arrow-left'></i></button>", 98 nextArrow:"<button type='button' class='slick-next slick-arrow'><i class='bi bi-arrow-right'></i></button>" 99 }); 100 101 jQuery('.slider-produtos-mobile').slick({ 102 slidesToShow: 1, 103 slidesToScroll: 1, 104 centerMode: true, 105 centerPadding: '40px', 106 autoplay: false, 107 fade: false,
108 autoplaySpeed: autoplay, 109 arrows: true, 110 dots: false, 111 pauseOnHover: false, 112 prevArrow:"<button type='button' class='slick-prev slick-arrow'><i class='bi bi-arrow-left'></i></button>", 113 nextArrow:"<button type='button' class='slick-next slick-arrow'><i class='bi bi-arrow-right'></i></button>" 114 }); 115 116 jQuery('.slider-cardapio-mobile').slick({ 117 slidesToShow: 4, 118 slidesToScroll: 1, 119 autoplay: false, 120 fade: false, 121 arrows: true, 122 dots: false, 123 variableWidth: true, 124 centerMode: true, 125 centerPadding: '0px', 126 }); 127 128 jQuery('.slider-restaurantes').slick({ 129 slidesToShow: 1, 130 slidesToScroll: 1, 131 autoplay: true, 132 autoplaySpeed: 4000, 133 fade: true, 134 arrows: false, 135 dots: true, 136 pauseOnHover: false, 137 appendDots: jQuery('.wrapper-dots>div'), 138 }); 139 140 var SPMaskBehavior = function (val) { 141 return val.replace(/\D/g, '').length === 11 ? '(00) 00000-0000' : '(00) 0000-00009'; 142 }, 143 spOptions = { 144 onKeyPress: function(val, e, field, options) { 145 field.mask(SPMaskBehavior.apply({}, arguments), options); 146 } 147 }; 148 149 jQuery('.cel-mask').mask(SPMaskBehavior, spOptions); 150 151 jQuery('.wrapper-header header#sitcky-header>div>div>div .wrapper-content .wrapper-nav-menu nav ul li a').hover(function(){ 152 var index = jQuery(this).data('img'); 153 jQuery('.wrapper-header header#sitcky-header>div>div>div .wrapper-img img').removeClass('active'); 154 jQuery('.wrapper-header header#sitcky-header>div>div>div .wrapper-img img:nth-child(' + index + ')').addClass('active'); 155 }); 156 157 jQuery('.wrapper-header header#sitcky-header>div>div>div .close a').on('click', function(e){ 158 e.preventDefault(); 159 jQuery('.wrapper-header header#sitcky-header').removeClass('active'); 160 }); 161 162 jQuery('#hamburguer-menu').on('click', function(e){ 163 e.preventDefault(); 164 jQuery('.wrapper-header header#sitcky-header').toggleClass('active'); 165 }); 166 167 jQuery('#nossas-casas>div>div>div .our-homes-card').on('click', function(e){ 168 jQuery(this).addClass('active'); 169 jQuery(this).parent().addClass('active'); 170 jQuery('.overlay-restaurantes-close').addClass('active'); 171 jQuery(this).parent().find('.see-address a').html('Voltar<img class="img-fluid p-2" src="' + Th2Obj.template_url + '/img/icon-arrow-right-black.svg" alt="">'); 172 }); 173 jQuery('#nossas-casas>div>div>div>div .see-address a').on('click', function(e){ 174 e.preventDefault(); 175 if(jQuery(this).parent().parent().parent().find('.our-homes-card').hasClass('active')){ 176 jQuery(this).parent().parent().parent().find('.our-homes-card').removeClass('active'); 177 jQuery(this).parent().parent().parent().removeClass('active'); 178 jQuery('.overlay-restaurantes-close').removeClass('active'); 179 jQuery(this).html('VER ENDEREÃO<img class="img-fluid p-2" src="' + Th2Obj.template_url + '/img/icon-arrow-left-black.svg" alt="">'); 180 }else{ 181 jQuery(this).parent().parent().parent().find('.our-homes-card').addClass('active'); 182 jQuery(this).parent().parent().parent().addClass('active'); 183 jQuery('.overlay-restaurantes-close').addClass('active'); 184 jQuery(this).html('Voltar<img class="img-fluid p-2" src="' + Th2Obj.template_url + '/img/icon-arrow-right-black.svg" alt="">'); 185 } 186 }); 187 188 jQuery('.overlay-restaurantes-close').on('click', function(){ 189 jQuery('#nossas-casas>div>div>div .our-homes-card').removeClass('active'); 190 jQuery('#nossas-casas>div>div>div').removeClass('active'); 191 jQuery('.overlay-restaurantes-close').removeClass('active'); 192 jQuery('#nossas-casas>div>div>div>div .see-address a').html('VER ENDEREÃO<img class="img-fluid p-2" src="' + Th2Obj.template_url + '/img/icon-arrow-left-black.svg" alt="">'); 193 }) 194 195 jQuery('#cardapio>div>div>div .wrapper-menu-cardapio ul>li>a').on('click', function(e){ 196 e.preventDefault(); 197 jQuery.scrollTo(event.target.hash, 200, { 198 offset: -30 199 }); 200 }); 201 202 jQuery('.slider-cardapio-mobile>div>div>li>a').on('click', function(e){ 203 e.preventDefault(); 204 jQuery.scrollTo(event.target.hash, 200, { 205 offset: -170 206 }); 207 }); 208}); 209 210jQuery(window).on('load', function(){ 211 topMenu(); 212 fullFirstScreen(); 213 dynamicSpacer(); 214 scrollToSection(); 215 scrollSpyCardapio(170); 216 try { 217 fixedMenuCardapio(); 218 } catch(e) { 219 console.log('sem menu fixo'); 220 } 221 222 try { 223 animateScrollPage(); 224 } catch (error) { 225 console.log('Sem hash na url'); 226 }; 227}); 228 229jQuery(window).on('scroll', function () { 230 topMenu(); 231 scrollSpyCardapio(35); 232 try { 233 fixedMenuCardapio(); 234 } catch(e) { 235 console.log('sem menu fixo'); 236 } 237}); 238 239jQuery(window).resize(function(){ 240 dynamicSpacer(); 241 fullFirstScreen(); 242}); 243
244function topMenu() { 245 if (jQuery(this).scrollTop() > 50) { 246 jQuery('#StickyHeader').addClass('sticked'); 247 try { 248 jQuery('#menu-mobile').addClass('sticked'); 249 } catch(e) { 250 console.log('sem menu cardapio'); 251 } 252 } else { 253 jQuery('#StickyHeader').removeClass('sticked'); 254 try { 255 jQuery('#menu-mobile').removeClass('sticked'); 256 } catch(e) { 257 console.log('sem menu cardapio'); 258 } 259 }; 260}; 261 262function fullFirstScreen(){ 263 var windowHeight = jQuery(window).height(); 264 jQuery('.fullscreen').height(windowHeight); 265}; 266 267function dynamicSpacer(){ 268 var headerHeight = (jQuery('header').height()); 269 jQuery('.dynamic-spacer').height(headerHeight); 270} 271 272function scrollToSection() { 273 jQuery(function(event) { 274 jQuery('.scrollTo a').on('click', function(event) { 275 event.preventDefault(); 276 jQuery('.navbar-toggler').removeClass('is-active'); 277 jQuery.scrollTo(event.target.hash, 200, { 278 offset: 0 279 }); 280 }); 281 }); 282} 283 284function scrollSpyCardapio(offsetHeader){ 285 var currentTop = jQuery(window).scrollTop(); 286 var elems = jQuery('.scrollspyCardapio'); 287 elems.each(function(index){ 288 var elemTop = (jQuery(this).offset().top) - offsetHeader; 289 var elemBottom = elemTop + jQuery(this).height(); 290 if(currentTop >= elemTop && currentTop <= elemBottom){ 291 var id = jQuery(this).attr('id'); 292 var navElem = jQuery('#cardapio>div>div>div .wrapper-menu-cardapio ul>li a[href="#' + id + '"]'); 293 var navElemMob = jQuery('.slider-cardapio-mobile>div>div>li a[href="#' + id + '"]'); 294 navElem.addClass('active').parent().siblings().find('a').removeClass( 'active' ); 295 navElemMob.addClass('active').parent().siblings().find('a').removeClass( 'active' ); 296 } 297 }) 298} 299 300function animateScrollPage() { 301 var hash = window.location.hash.substring(1); 302 var tag = jQuery("#" + hash + ""); 303 // Animation 304 if (hash) { 305 jQuery('html, body').animate({ 306 scrollTop: jQuery(tag).offset().top - 0 307 }, 250); 308 } else { 309 console.log("Sem nenhum âncora"); 310 } 311} 312 313function fixedMenuCardapio() { 314 var position = jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').offset(); 315 var width = jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').width(); 316 var left = position.left; 317 var maxScroll = jQuery('footer').offset().top; 318 var currentTop = jQuery(window).scrollTop(); 319 var menuHeight = jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').height() + 91; 320 maxScroll = maxScroll - menuHeight; 321 322 if (jQuery(window).scrollTop() > 250) { 323 jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').addClass('fixed'); 324 jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').css({ 325 width: width, 326 }); 327 } else { 328 jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').removeClass('fixed'); 329 }; 330 331 if(maxScroll <= currentTop && currentTop > 250){ 332 jQuery('#cardapio>div>div>div .wrapper-menu-cardapio').removeClass('fixed'); 333 jQuery('#cardapio>div>div>div:nth-child(2)').addClass('justify-content-end'); 334 }else{ 335 jQuery('#cardapio>div>div>div:nth-child(2)').removeClass('justify-content-end'); 336 } 337};
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.