1jQuery(function(){ 2 initLightbox(); 3}); 4function initLightbox() { 5 jQuery('a.lightbox, a[rel*="lightbox"]').fancybox({ 6 helpers: { 7 }, 8 afterLoad: function(current, previous) { 9 // handle custom close button in inline modal 10 if(current.href.indexOf('#') === 0) { 11 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){ 12 e.preventDefault(); 13 jQuery.fancybox.close(); 14 }); 15 } 16 } 17 }); 18} 19 20(function(){ 21 $(function(){ 22 /*General*/ 23 initFunc(dinewine.general); 24 /*End General*/ 25 /*Home 1*/ 26 initFunc(dinewine.home_1); 27 /*End Home 1*/ 28 /*Home 2*/ 29 initFunc(dinewine.home_2); 30 /*End Home 2*/ 31 /*Static 2*/ 32 initFunc(dinewine.static_2); 33 /*End Static 2*/ 34 /*Blog 1, Blog 2*/ 35 initFunc(dinewine.blogs); 36 /*End Blog 1, Blog 2*/ 37 /*Events*/ 38 initFunc(dinewine.events); 39 /*End Events*/ 40 /*gallery*/ 41 initFunc(dinewine.gallery); 42 /*End gallery*/ 43 /*faqs*/ 44 initFunc(dinewine.faqs); 45 /*End faqs*/ 46 /*web app 1*/ 47 initFunc(dinewine.web_app_1); 48 /*End web app 1*/ 49 /*web app 2*/ 50 initFunc(dinewine.web_app_2); 51 /*End web app 2*/ 52 /*ecommerce*/ 53 initFunc(dinewine.e_commerce); 54 /*End ecommerce*/ 55 /*product list 1*/ 56 initFunc(dinewine.product_list_1); 57 /*End product list 1*/ 58 /*product detail*/ 59 initFunc(dinewine.product_detail); 60 /*End pproduct detail*/ 61 /*shopping cart*/ 62 initFunc(dinewine.shopping_cart); 63 /*end shopping cart*/ 64 /*multi step*/ 65 initFunc(dinewine.multi_step); 66 /*end multi step*/ 67 /*secure zone*/ 68 initFunc(dinewine.secure_zone); 69 /*end secure zone*/ 70 /*reservation*/ 71 initFunc(dinewine.reservation); 72 /*end reservation*/ 73 74 }); 75 76 $(window).load(function(){ 77 /*menu 1*/ 78 initFunc(dinewine.menu_1); 79 /*end menu 1*/ 80 $('html').addClass('loaded'); 81 }); 82 83 var dinewine = { 84 general : { 85 backToTop : function() { 86 var condition = $('.back-to-top').size() 87 // && false 88 ;init(condition); 89 90 function init(condition) { 91 if(condition || condition == null) { 92 $('.back-to-top').click(function() { 93 $('body,html').animate({ 94 scrollTop: 0 95 }, 500); 96 97 return false; 98 }); 99 100 $(window).scroll(function () { 101 scroll(); 102 }); 103 104 scroll(); 105 } 106 } 107 108 function scroll() { 109 var x = $(document).scrollTop(); 110 var _offset = 100; 111 112 if(x > _offset) { 113 $('body').addClass('scroll'); 114 } else { 115 $('body').removeClass('scroll'); 116 } 117 } 118 }, 119 initTouchNav : function() { 120 jQuery('#nav').each(function(){ 121 new TouchNav({ 122 navBlock: this 123 }); 124 }); 125 }, 126 initAddClasses : function() { 127 jQuery('.search-opener').clickClass({ 128 classAdd: 'search-active', 129 addToParent: 'header-search' 130 }); 131 }, 132 initHeaderSmallScroll : function() { 133 $(window).scroll(function () { 134 scroll(); 135 }); 136 137 scroll(); 138 139 function scroll() { 140 var x = $(document).scrollTop(); 141 var _offset = 0; 142 143 if($('.login-nav').length) { 144 _offset = 31; 145 } 146 147 if(x > _offset) { 148 $('body').addClass('scroll'); 149 } else { 150 $('body').removeClass('scroll'); 151 } 152 } 153 },
154 initDropDownClasses : function() { 155 $('#nav li').each(function() { 156 var item = $(this); 157 var drop = item.find('ul'); 158 var link = item.find('a').eq(0); 159 if(drop.length) { 160 item.addClass('has-drop-down'); 161 if(link.length) link.addClass('has-drop-down-a'); 162 } 163 }); 164 }, 165 initMobileNav : function() { 166 $('body').mobileNav({ 167 hideOnClickOutside: true, 168 menuActiveClass: 'nav-active', 169 menuOpener: '.nav-opener', 170 menuDrop: '#nav' 171 }); 172 }, 173 initCustomForms : function() { 174 jcf.setOptions('Select', { 175 wrapNative: false 176 }); 177 jcf.replaceAll(); 178 }, 179 initAnimateBLock : function() { 180 var condition = $('.animateBlockHolder').size() 181 // && false 182 ;init(condition); 183 184 function init(condition) { 185 if(condition || condition == null) { 186 $(window).load(function(){ 187 $('.animateBlockHolder').viewportChecker({ 188 classToAdd: 'animate_start', 189 offset: '10%' 190 }); 191 }); 192 } 193 } 194 }, 195 initDatepicker : function() { 196 $('[data-datepicker]').datepicker(); 197 }, 198 validationRemoveError : function() { 199 $('input, select, textarea').change(function() { 200 $(this).removeClass('error'); 201 $(this).closest('li').removeClass('error'); 202 }); 203 }, 204 initTabs : function() { 205 $('ul.tabset').tabset({ 206 tabLinks: 'a', 207 addToParent: true, 208 autoHeight: true, 209 defaultTab: false 210 }); 211 212 $('ul.elements-tabset').tabset({ 213 tabLinks: 'a', 214 addToParent: true, 215 autoHeight: true, 216 defaultTab: false 217 }); 218 }, 219 initBrogressBar : function() { 220 var condition = $('.progressBarAnimate').size() 221 // && false 222 ;init(condition); 223 224 function init(condition) { 225 if(condition || condition == null) { 226 $('.progressBarAnimate').viewportChecker({ 227 classToAdd: 'animate' 228 }); 229 } 230 } 231 }, 232 initCalloutClose : function() { 233 $(document).on('click', '.calloutCloseHoler .close', function() { 234 $(this).closest('.calloutCloseHoler').fadeOut(); 235 236 return false; 237 }); 238 }, 239 initAnchorNav : function() { 240 $('.anchor-nav a').click(function(){ 241 var el = $(this).attr('href'); 242 var elWrapped = $(el); 243 var navheight = $('#header .header-frame').outerHeight(); 244 scrollToElement(elWrapped,navheight); 245 return false; 246 }); 247 248 function scrollToElement(element,navheight){ 249 var offset = element.offset(); 250 var offsetTop = offset.top; 251 var positionTop = element.attr('id'); 252 var totalScroll = offsetTop-navheight; 253 254 $('body,html').animate({ 255 scrollTop: totalScroll 256 }, 500); 257 } 258 }, 259 initOpenClose : function() { 260 jQuery('.code-open-close').OpenClose({ 261 activeClass: 'active', 262 opener: '.opener', 263 slider: '.slide', 264 animSpeed: 400, 265 effect: 'slide' 266 }); 267 268 jQuery('.slider-navigation li').OpenClose({ 269 activeClass: 'selected', 270 opener: '.opener', 271 slider: '.slide', 272 animSpeed: 400, 273 effect: 'slide' 274 }); 275 }, 276 initTextSlider : function() { 277 var condition = $('.text-slider').size() 278 // && false 279 ;init(condition); 280 281 function init(condition) { 282 if(condition || condition == null) { 283 $('.text-slider .slideset').bxSlider({ 284 mode : 'horizontal', 285 // pagerCustom: '.text-slider .sliderNav', 286 controls : false, 287 slideSelector : '.slide', 288 adaptiveHeight : true, 289 auto : true 290 }); 291 } 292 } 293 }, 294 initCopyCode : function () { 295 var condition = $('.codeHolder').size() 296 // && false 297 ;init(condition); 298 299 function init(condition) { 300 if(condition || condition == null) { 301 var clipboard = new Clipboard('.codeHolder .copy-text', { 302 text: function (trigger) { 303 304 var __text = $(trigger).closest('.codeHolder').find('code').text(); 305 306 return __text; 307 } 308 }); 309 } 310 } 311 }, 312 initAccordion : function() { 313 jQuery('ul.accordion').slideAccordion({ 314 addClassBeforeAnimation: true, 315 opener: 'a.opener', 316 slider: 'div.slide', 317 animSpeed: 300 318 }); 319 } 320 }, 321 home_1 : { 322 initHome1PageSlider : function() { 323 var condition = $('.homePageSliderHolder').size() 324 // && false 325 ;init(condition); 326 327 function init(condition) { 328 if(condition || condition == null) { 329 var homeSliderPause = +$('.homePageSliderHolder').data('pause'); 330 var homeSliderAuto = true; 331 332 if(!homeSliderPause) homeSliderAuto = false; 333 334 var homeSlider = $('.homePageSliderHolder .slideset').bxSlider({ 335 mode: 'fade', 336 slideSelector : $('.homePageSliderHolder .slide'), 337 pager : true, 338 controls : false, 339 auto : homeSliderAuto, 340 pause : homeSliderPause, 341 onSlideAfter : function($slideElement) { 342 $('.homePageSliderHolder .slide').removeClass('animate_start').removeClass('active'); 343 $($slideElement).addClass('animate_start').addClass('active'); 344 }, 345 onSliderLoad : function(currentIndex) { 346 $('.homePageSliderHolder .slide').eq(currentIndex).addClass('animate_start').addClass('active'); 347 } 348 }); 349 350 $('.homePageSliderHolder .btn-next').click(function() { 351 homeSlider.goToNextSlide(); 352 353 return false; 354 }); 355 356 $('.homePageSliderHolder .btn-prev').click(function() { 357 homeSlider.goToPrevSlide(); 358 359 return false; 360 }); 361 } 362 } 363 }, 364 initHome1CafeSlider : function() {
365 var condition = $('.home1CafeSlider').size() 366 // && false 367 ;init(condition); 368 369 function init(condition) { 370 if(condition || condition == null) { 371 372 var carouselGallerySlider = $('.home1CafeSlider .slideset').bxSlider({ 373 slideSelector : $('.home1CafeSlider .slide'), 374 pager : false, 375 controls : false, 376 auto : false, 377 minSlides: 1, 378 maxSlides: 3, 379 touchEnabled: false, 380 moveSlides: 1, 381 slideWidth: 360, 382 shrinkItems: true, 383 slideMargin : 30, 384 infiniteLoop : true 385 }); 386 387 $('.home1CafeSlider .btn-next').click(function() { 388 carouselGallerySlider.goToNextSlide(); 389 390 return false; 391 }); 392 393 $('.home1CafeSlider .btn-prev').click(function() { 394 carouselGallerySlider.goToPrevSlide(); 395 396 return false; 397 }); 398 399 $('.home1GalleryCafeLightbox').fancybox({ 400 afterLoad: function(current, previous) { 401 // handle custom close button in inline modal 402 if(current.href.indexOf('#') === 0) { 403 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){ 404 e.preventDefault(); 405 jQuery.fancybox.close(); 406 }); 407 } 408 } 409 }); 410 } 411 } 412 } 413 }, 414 home_2 : { 415 initHome2PageSlider : function() { 416 var condition = $('.home2PageSliderHolder').size() 417 // && false 418 ;init(condition); 419 420 function init(condition) { 421 if(condition || condition == null) { 422 var homeSliderPause = +$('.home2PageSliderHolder').data('pause'); 423 var homeSliderAuto = true; 424 425 if(!homeSliderPause) homeSliderAuto = false; 426 427 var homeSlider = $('.home2PageSliderHolder .slideset').bxSlider({ 428 mode: 'fade', 429 slideSelector : $('.home2PageSliderHolder .slide'), 430 pager : true, 431 controls : false, 432 auto : homeSliderAuto, 433 touchEnabled: false, 434 pause : homeSliderPause, 435 onSlideAfter : function($slideElement) { 436 $('.home2PageSliderHolder .slide').removeClass('animate_start').removeClass('active'); 437 $($slideElement).addClass('animate_start').addClass('active'); 438 }, 439 onSliderLoad : function(currentIndex) { 440 $('.home2PageSliderHolder .slide').eq(currentIndex).addClass('animate_start').addClass('active'); 441 } 442 }); 443 444 $('.home2PageSliderHolder .btn-next').click(function() { 445 homeSlider.goToNextSlide(); 446 447 return false; 448 }); 449 450 $('.home2PageSliderHolder .btn-prev').click(function() { 451 homeSlider.goToPrevSlide(); 452 453 return false; 454 }); 455 } 456 } 457 }, 458 initHome2TestimonialSlider : function() { 459 var condition = $('.home2TestimonialSlider').size() 460 // && false 461 ;init(condition); 462 463 function init(condition) { 464 if(condition || condition == null) { 465 var homeSliderPause = +$('.home2TestimonialSlider').data('pause'); 466 var homeSliderAuto = true; 467 468 if(!homeSliderPause) homeSliderAuto = false; 469 470 var carouselGallerySlider = $('.home2TestimonialSlider .slideset').bxSlider({ 471 slideSelector : $('.home2TestimonialSlider .slide'), 472 pager : false, 473 controls : false, 474 auto : homeSliderAuto, 475 pause : homeSliderPause, 476 touchEnabled: false, 477 autoHover : true, 478 adaptiveHeight : true 479 }); 480 481 $('.home2TestimonialSlider .btn-next').click(function() { 482 carouselGallerySlider.goToNextSlide(); 483 484 return false; 485 }); 486 487 $('.home2TestimonialSlider .btn-prev').click(function() { 488 carouselGallerySlider.goToPrevSlide(); 489 490 return false; 491 }); 492 } 493 } 494 }, 495 animateAnchorScroll : function() { 496 $('.home2PageSliderHolder a[href^="#"]').click(function(){ 497 var el = $(this).attr('href'); 498 var elWrapped = $(el); 499 500 if(elWrapped.length) scrollToElement(elWrapped,87); 501 502 return false; 503 }); 504 505 function scrollToElement(element,navheight){ 506 var offsetTop = element.offset().top; 507 var totalScroll = offsetTop - navheight; 508 509 $('body,html').animate({ 510 scrollTop: totalScroll 511 }, 1000); 512 } 513 } 514 }, 515 static_2 : { 516 initSubMenuToSidebar : function() { 517 var menuSelector = '#nav ul:eq(0)'; 518 var sidebarPlaceHolderSelect = '.sidebarSubmenuPlaceHolder';//side-navigation 519 var activeSelector = '.selected'; 520 521 var condition = $(sidebarPlaceHolderSelect).size() && $(menuSelector + ' ' + activeSelector + ":has(ul)").size() 522 // && false 523 ;init(condition); 524 525 function init(condition) 526 { 527 if(condition || condition == null) 528 { 529 copyToSidebar(); 530 } 531 } 532 533 function copyToSidebar() 534 { 535 var submenuCopy = $(menuSelector).find(activeSelector + ':first ul:eq(0)').clone(); 536 537 $('.sidebarSubmenuPlaceHolder').show(); 538 $(sidebarPlaceHolderSelect).append(submenuCopy); 539 } 540 }, 541 videoFancy : function() {
542 $('.videoFancy').fancybox({ 543 544 afterLoad: function(current, previous) { 545 // handle custom close button in inline modal 546 if(current.href.indexOf('#') === 0) { 547 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){ 548 e.preventDefault(); 549 jQuery.fancybox.close(); 550 }); 551 } 552 } 553 }); 554 } 555 }, 556 blogs : { 557 initBlogArchive : function() { 558 var condition = $('.restructuredArchive').size() 559 // && false 560 ;init(condition); 561 562 function init(condition) { 563 if (condition) { 564 setupOpenClose(); 565 } 566 } 567 568 function setupOpenClose() { 569 $('.yearTemplate').OpenClose({ 570 opener: '.openYear', 571 effect: 'slide', 572 slider:'.monthsItems' 573 }); 574 575 var currentUrlPath = location.pathname; 576 577 $('.yearTemplate .monthsItems a').each(function() { 578 var href = $(this).attr('href'); 579 580 if(href == currentUrlPath) { 581 $(this).closest('.yearTemplate').find('.openYear').click(); 582 } 583 }); 584 } 585 }, 586 initAjaxLoadMoreFunction : function(){ 587 var condition = $('.blogListHolder').length 588 // && false 589 ;init(condition); 590 591 function init(condition) 592 { 593 if(condition || condition == null) 594 { 595 if($('.blogListHolder .pagination ul li.active').next().length) 596 { 597 $('.blogListLoadMoreBtn').attr('href', $('.blogListHolder .pagination ul li.active').next().find('a').attr('href')); 598 } 599 else 600 { 601 $('.loadHolder').hide(); 602 } 603 604 $('.blogListLoadMoreBtn').click(function() 605 { 606 var _this = $(this); 607 var _href = _this.attr('href'); 608 609 $.ajax({
610 url: _href, 611 success: function(data){ 612 var requiredObject = $('div.blogListHolder', data); 613 var _items = requiredObject.find('.postBlock'); 614 var _nextPage = requiredObject.find('.pagination ul li.active').next().find('a'); 615 616 $('.blogListHolder .pagination').before(_items); 617 618 setTimeout(function() { 619 $('.blogListHolder .postBlock').animate({'opacity' : 1},300); 620 $('.blogListHolder .postBlock').addClass('animate_start'); 621 },100); 622 623 if(_nextPage.length) 624 { 625 $('.loadHolder a').attr('href', _nextPage.attr('href')); 626 } 627 else 628 { 629 $('.loadHolder a').hide(); 630 } 631 } 632 }); 633 634 return false; 635 }); 636 } 637 } 638 }, 639 640 initBlogPostDetailSlider : function() { 641 var condition = $('.blogPostSlider').size() 642 // && false 643 ;init(condition); 644 645 function init(condition) { 646 if(condition || condition == null) { 647 var infiniteLoop = false; 648 649 if($('.blogPostSlider .slide').length >= 3) infiniteLoop = true; 650 651 var carouselGallerySlider = $('.blogPostSlider .slideset').bxSlider({ 652 slideSelector : $('.blogPostSlider .slide'), 653 pager : false, 654 controls : false, 655 auto : false, 656 minSlides: 1, 657 maxSlides: 3, 658 moveSlides: 1, 659 slideWidth: 230, 660 shrinkItems: true, 661 touchEnabled: false, 662 slideMargin : 30, 663 infiniteLoop : infiniteLoop 664 }); 665 666 $('.blogPostSlider .btn-next').click(function() { 667 carouselGallerySlider.goToNextSlide(); 668 669 return false; 670 }); 671 672 $('.blogPostSlider .btn-prev').click(function() { 673 carouselGallerySlider.goToPrevSlide(); 674 675 return false; 676 }); 677 } 678 } 679 }, 680 initBlogSearch : function() { 681 $('.blogSearchForm').submit(function() { 682 $(this).ajaxSubmit({ 683 success: function(data) { 684 var requiredObject = $('div.blogSearchResults', data); 685 686 $('#catblogoutput').html(''); 687 $('#catblogoutput').append('<h1>Search results for: "' + $('.blogSearchForm #CAT_Search').val() + '"</h1>'); 688 689 if(requiredObject.find('.post').length) { 690 $('#catblogoutput').append(requiredObject.find('.post')); 691 } else { 692 $('#catblogoutput').append('<h3>No search results</h3>'); 693 } 694 } 695 }); 696 697 return false; 698 }); 699 }, 700 initFirstPost : function() { 701 var condition = $('.blog1Holder').size() 702 // && false 703 ;init(condition); 704 705 function init(condition) { 706 if(condition || condition == null) { 707 $('.firstPostHolder').append($('.blogListHolder .block').eq(0)); 708 $('.firstPostHolder .img-block img').attr('src',$('.firstPostHolder .img-block img').attr('src').split('?')[0]); 709 } 710 } 711 }, 712 }, 713 events : { 714 eventList : function() { 715 var condition = $('.eventMasonryList').size() 716 // && false 717 ;init(condition); 718 719 function init(condition) { 720 if(condition || condition == null) { 721 var $grid = $('.eventMasonryList').masonry({ 722 itemSelector: '.info-block', 723 percentPosition: true, 724 originLeft :true, 725 originTop : true 726 }); 727 728 $grid.imagesLoaded().progress( function() { 729 $grid.masonry('layout'); 730 }); 731 732 window.ajaxFlag2 = true; 733 734 $(window).scroll(function() { 735 loadContent($grid); 736 }); 737 } 738 } 739 740 function loadContent(masonryGrid) { 741 if(window.ajaxFlag2) { 742 var contentPosition = $('.eventMasonryList').offset().top + $('.eventMasonryList').outerHeight(); 743 var currentPosition = $(window).scrollTop() + $(window).height(); 744 var _nextBTN = $('.eventMasonryList .pagination.webapp .pag-next'); 745 746 if(currentPosition > contentPosition) { 747 if(_nextBTN.length) { 748 window.ajaxFlag2 = false; 749 750 var nextPageLink = _nextBTN.find('a').attr('href'); 751 752 $.ajax({
753 url: nextPageLink, 754 success: function(data) { 755 var requiredObject = $('div.eventMasonryList', data); 756 var items = requiredObject.find('.info-block' ); 757 var __next = requiredObject.find('.pagination.webapp .pag-next a'); 758 759 items.hide(); 760 masonryGrid.append( items ); 761 masonryGrid.imagesLoaded().done( function() { 762 items.show(); 763 masonryGrid.masonry( 'appended', items ); 764 }); 765 766 if(__next.length) { 767 _nextBTN.find('a').attr('href', __next.attr('href')); 768 } 769 else { 770 _nextBTN.remove(); 771 } 772 773 window.ajaxFlag2 = true; 774 } 775 }); 776 } 777 } 778 } 779 } 780 }, 781 eventMap : function() { 782 var condition = $('#eventMap').size() 783 // && false 784 ;init(condition); 785 786 function init(condition) { 787 if(condition || condition == null) { 788 var myLatLng = {lat: $('#eventMap').data('lat'), lng: $('#eventMap').data('long')}; 789 790 initMap(myLatLng); 791 } 792 793 function initMap(myLatLng) { 794 var mapOptions = { 795 zoom: 12, 796 center: myLatLng, 797 scrollwheel: false, 798 mapTypeId: google.maps.MapTypeId.ROADMAP 799 }; 800 801 var mapElement = document.getElementById('eventMap'); 802 var map = new google.maps.Map(mapElement, mapOptions); 803 var marker = new google.maps.Marker({ 804 position: myLatLng, 805 map: map, 806 icon: '/images/map-marker.png' 807 }); 808 809 } 810 } 811 }, 812 eventFancy : function() { 813 $('.bookingOpenForm').fancybox({ 814 afterLoad: function(current, previous) { 815 // handle custom close button in inline modal 816 if(current.href.indexOf('#') === 0) { 817 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){ 818 e.preventDefault(); 819 jQuery.fancybox.close(); 820 }); 821 } 822 } 823 }); 824 } 825 }, 826 gallery : { 827 galleryHorizontalScrolling : function() { 828 var condition = $('.galleryHorizontalScrolling').size() 829 // && false 830 ;init(condition); 831 832 function init(condition) { 833 if(condition || condition == null) { 834 var _el = $('.galleryHorizontalScrolling .frame'); 835 _el.sly({ 836 slidee : $('.galleryHorizontalScrolling .frame ul'), 837 horizontal: 1, 838 itemNav: 'basic', 839 smart: 1, 840 activateOn: 'click', 841 mouseDragging: 1, 842 touchDragging: 1, 843 releaseSwing: 1, 844 startAt: 0, 845 scrollBar: $('.galleryHorizontalScrolling').find('.scrollbar'), 846 scrollBy: 1, 847 speed: 300, 848 elasticBounds: 1, 849 dragHandle: 1, 850 dynamicHandle: 1, 851 clickBar: 1 852 }); 853 854 $(window).resize(function(e) { 855 _el.sly('reload'); 856 }); 857 } 858 } 859 }, 860 carouselGallery : function() { 861 var condition = $('.carouselGalleryHolder').size() 862 // && false 863 ;init(condition); 864 865 function init(condition) { 866 if(condition || condition == null) { 867 868 var _thumbSlider = $('.carouselGalleryHolder .thumbnail ul').bxSlider({ 869 slideMargin : 0, 870 infiniteLoop : false, 871 pager : false, 872 controls : false, 873 minSlides : 2, 874 maxSlides : 5, 875 touchEnabled: false, 876 moveSlides : 1, 877 slideWidth : 228 878 }); 879 880 var _bigSlider = $('.carouselGalleryHolder .imageHolder').bxSlider({ 881 mode : 'fade', 882 slideSelector : '.slide', 883 adaptiveHeight : true, 884 pagerCustom : $('.carouselGalleryHolder .thumbnail ul'), 885 controls : false, 886 onSlideAfter : function($slideElement, oldIndex, newIndex) 887 { 888 $('.carouselGalleryHolder .thumbnail ul li').removeClass('active'); 889 $('.carouselGalleryHolder .thumbnail ul li').eq(newIndex - 1).addClass('active'); 890 } 891 }); 892 893 $('.carouselGalleryHolder .btn-next').click(function() { 894 _thumbSlider.goToNextSlide(); 895 896 return false; 897 }); 898 899 $('.carouselGalleryHolder .btn-prev').click(function() { 900 _thumbSlider.goToPrevSlide(); 901 902 return false; 903 }); 904 } 905 } 906 }, 907 mosaicGallery : function() { 908 var condition = $('.mosaicGalleryHolder').size() 909 // && false 910 ;init(condition); 911 912 function init(condition) { 913 if(condition || condition == null) { 914 var $grid = $('.mosaicGalleryHolder').masonry({ 915 itemSelector: '.img-block', 916 percentPosition: true, 917 originLeft :true, 918 originTop : true 919 }); 920 921 $grid.imagesLoaded().progress( function() { 922 $grid.masonry('layout'); 923 }); 924 } 925 } 926 }, 927 fullWidthGallery : function() { 928 var condition = $('.fullWidthGallery').size() 929 // && false 930 ;init(condition); 931 932 function init(condition) { 933 if(condition || condition == null) { 934 $('.fullWidthGallery ul').bxSlider({ 935 slideMargin : 0, 936 infiniteLoop : true, 937 pager : false, 938 controls : false, 939 minSlides : 4, 940 maxSlides : 7, 941 moveSlides : 1, 942 slideWidth : 265, 943 auto : true, 944 touchEnabled: false, 945 pause : 5000 946 }); 947 } 948 } 949 }, 950 galleryFancy : function() { 951 $('.galleryLightbox').fancybox({ 952 afterLoad: function(current, previous) { 953 // handle custom close button in inline modal 954 if(current.href.indexOf('#') === 0) { 955 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){
956 e.preventDefault(); 957 jQuery.fancybox.close(); 958 }); 959 } 960 } 961 }); 962 } 963 }, 964 faqs : { 965 faqsAccordion : function() { 966 var condition = $('.faqsAccordion').size() 967 // && false 968 ;init(condition); 969 970 function init(condition) { 971 if(condition || condition == null) { 972 $('ul.faqsAccordion').slideAccordion({ 973 addClassBeforeAnimation: true, 974 opener: 'a.opener', 975 slider: 'div.slide', 976 animSpeed: 300 977 }); 978 } 979 } 980 } 981 }, 982 web_app_1 : { 983 detailPaging : function() { 984 var condition = $('.webAppDetailPaging').size() 985 // && false 986 ;init(condition); 987 988 function init(condition) 989 { 990 if(condition || condition == null) 991 { 992 993 var currentId = $('[data-current_id]').data('current_id'); 994 995 var index = $('.hiddenWebAppListHolder [data-id="' + currentId + '"]').index(); 996 var prevIndex = index - 1; 997 var nextIndex = index + 1; 998 999 if(prevIndex >= 0 ) 1000 { 1001 $('.webAppDetailPaging .prev').show(); 1002 $('.webAppDetailPaging .prev').attr('href',$('.hiddenWebAppListHolder .hiddenItem').eq(prevIndex).data('link')); 1003 $('.webAppDetailPaging .prev .title').html($('.hiddenWebAppListHolder .hiddenItem').eq(prevIndex).data('name')); 1004 $('.webAppDetailPaging .prev .position').html($('.hiddenWebAppListHolder .hiddenItem').eq(prevIndex).data('position')); 1005 } 1006 1007 if(nextIndex < $('.hiddenWebAppListHolder .hiddenItem').length) 1008 { 1009 $('.webAppDetailPaging .next').show(); 1010 $('.webAppDetailPaging .next').attr('href',$('.hiddenWebAppListHolder .hiddenItem').eq(nextIndex).data('link')); 1011 $('.webAppDetailPaging .next .title').html($('.hiddenWebAppListHolder .hiddenItem').eq(nextIndex).data('name')); 1012 $('.webAppDetailPaging .next .position').html($('.hiddenWebAppListHolder .hiddenItem').eq(nextIndex).data('position')); 1013 } 1014 } 1015 } 1016 } 1017 }, 1018 web_app_2 : { 1019 webApp2Fancy : function() { 1020 $('.webApp2Lightbox').fancybox({ 1021 afterLoad: function(current, previous) { 1022 // handle custom close button in inline modal 1023 if(current.href.indexOf('#') === 0) { 1024 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){ 1025 e.preventDefault(); 1026 jQuery.fancybox.close(); 1027 }); 1028 } 1029 } 1030 }); 1031 } 1032 }, 1033 e_commerce : { 1034 general : function() { 1035 $(document).on('ezbcAppReady', function() { 1036 setTimeout(function() { 1037 jcf.destroyAll(); 1038 jcf.replaceAll(); 1039 },100); 1040 }); 1041 1042 $('.payBtn').click(function() { 1043 $('#catwebformform42059').submit(); 1044 1045 return false; 1046 }); 1047 1048 window.UpdateShipping = function(e, t, a) { 1049 var n = document.getElementById("catCartDetails"); 1050 if (n) { 1051 var i = CMS.OrderRetrievev2.ServerSideUpdateShipping(t, e, a); 1052 1053 setTimeout(function() { 1054 $('input[type="number"]').eq(0).trigger('focus'); 1055 $('input[type="number"]').eq(0).trigger('blur'); 1056 }, 0); 1057 i.value[0] && (n.innerHTML = i.value[2]), 1058 i.value[1].length > 0 && (/(iP[ao]d|iPhone).*?Safari/.test(navigator.userAgent) ? setTimeout(function() { 1059 alert(i.value[1]) 1060 }, 0) : alert(i.value[1])); 1061 } 1062 } 1063 1064 window.SetShippingCountry = function(e, t, a) { 1065 var n = document.getElementById("shippingPostcode") 1066 , i = "" 1067 , r = document.getElementById("shippingState") 1068 , s = "" 1069 , o = document.getElementById("catCartDetails"); 1070 if (o) { 1071 n && (i = n.value), 1072 r && r.selectedIndex > 0 && (s = r[r.selectedIndex].text); 1073 var l = CMS.OrderRetrievev2.ServerSideSetShippingCountry(t, e, s, i, a); 1074 o.innerHTML = l.value 1075 setTimeout(function() { 1076 $('input[type="number"]').eq(0).trigger('focus'); 1077 $('input[type="number"]').eq(0).trigger('blur'); 1078 }, 0); 1079 } 1080 } 1081 1082 window.ApplyTaxRate = function(e, t, a, n, i) { 1083 var r = document.getElementById("catCartDetails"); 1084 if (r) { 1085 var s = document.getElementById("shippingCountry") 1086 , o = ""; 1087 s && (o = s.value); 1088 var l = document.getElementById("shippingPostcode") 1089 , d = ""; 1090 l && (d = l.value); 1091 var c = document.getElementById("shippingState") 1092 , u = ""; 1093 c && c.selectedIndex > 0 && (u = c[c.selectedIndex].text); 1094 var h = CMS.OrderRetrievev2.ServerSideUpdateTaxCode(t, e, a, n, i, o, u, d, !0); 1095 r.innerHTML = h.value; 1096 setTimeout(function() { 1097 $('input[type="number"]').eq(0).trigger('focus'); 1098 $('input[type="number"]').eq(0).trigger('blur'); 1099 }, 0); 1100 } 1101 } 1102 } 1103 }, 1104 product_list_1 : { 1105 load_more : function() { 1106 var condition = $('.loadMoreProductBtn').size() 1107 // && false 1108 ;init(condition); 1109 1110 function init(condition) { 1111 if(condition || condition == null) { 1112 if($('.nextPageHolder a').attr('href') != '#') { 1113 $('.loadMoreProductBtn .button').attr('href',$('.nextPageHolder a').attr('href')); 1114 } else { 1115 $('.loadMoreProductBtn').hide(); 1116 } 1117 1118 $('.loadMoreProductBtn .button').click(function() { 1119 var _this = $(this); 1120 var _href = _this.attr('href'); 1121 1122 $.ajax({
1123 url: _href, 1124 success: function(data){ 1125 var requiredObject = $('div.product-container', data); 1126 var _items = requiredObject.find('.productList li'); 1127 _items.css('opacity',0); 1128 var _nextPageUrl = requiredObject.find('.nextPageHolder a').attr('href'); 1129 1130 $('.productList').append(_items); 1131 1132 setTimeout(function() { 1133 $('.productList li').animate({'opacity' : 1},300); 1134 },100); 1135 1136 if(!requiredObject.find('.nextPageHolder a').length) { 1137 $('.loadMoreProductBtn').hide(); 1138 } else { 1139 $('.loadMoreProductBtn .button').attr('href', _nextPageUrl); 1140 } 1141 } 1142 }); 1143 1144 return false; 1145 }); 1146 } 1147 } 1148 } 1149 }, 1150 product_detail : { 1151 reset_detail : function() { 1152 var condition = $('.productList.productLarge').size() 1153 // && false 1154 ;init(condition); 1155 1156 function init(condition) { 1157 if(condition || condition == null) { 1158 resetProductDetail(); 1159 } 1160 } 1161 1162 function resetProductDetail() { 1163 setTimeout(function() { 1164 if($('.productSubmitInput').data('enabled') != true) { 1165 dinewine.general.initCustomForms(); 1166 dinewine.product_detail.initProductDetailSlider(); 1167 $('.productSubmitInput').data('enabled', true); 1168 } 1169 resetProductDetail(); 1170 }, 40); 1171 } 1172 }, 1173 initProductDetailSlider : function() { 1174 var condition = $('.productDetailGalleryHolder').size() && $('.productDetailGalleryHolder .slide').length > 1 1175 // && false 1176 ;init(condition); 1177 1178 function init(condition) { 1179 if(condition || condition == null) { 1180 if($('.productDetailGalleryHolder').data('enabled') != true) { 1181 $('.productDetailGalleryHolder .mask').bxSlider({ 1182 mode : 'fade', 1183 pagerCustom: '.productDetailGalleryHolder .thumbnails', 1184 controls : false, 1185 touchEnabled: false, 1186 slideSelector : '.productDetailGalleryHolder .slide', 1187 adaptiveHeight : true 1188 }); 1189 1190 var carouselGallerySlider = $('.thumbnails .slideset').bxSlider({ 1191 pager : false, 1192 controls : false, 1193 auto : false, 1194 minSlides: 2, 1195 maxSlides: 3, 1196 moveSlides: 1, 1197 slideWidth: 155, 1198 shrinkItems: true, 1199 slideMargin : 10 1200 }); 1201 1202 $('.productDetailGalleryHolder .btn-next').click(function() { 1203 carouselGallerySlider.goToNextSlide(); 1204 1205 return false; 1206 }); 1207 1208 $('.productDetailGalleryHolder .btn-prev').click(function() { 1209 carouselGallerySlider.goToPrevSlide(); 1210 1211 return false; 1212 }); 1213 } 1214 } 1215 } 1216 } 1217 }, 1218 shopping_cart : { 1219 resetShopingCart : function() { 1220 var condition = $('#catCartDetails').size() 1221 // && false 1222 ;init(condition); 1223 1224 function init(condition) { 1225 if(condition || condition == null) { 1226 resetShopingCart(); 1227 } 1228 } 1229 1230 function resetShopingCart() { 1231 setTimeout(function() { 1232 if(jQuery('#catCartDetails .shopping-table').data('enabled') != true) { 1233 dinewine.general.initCustomForms();
1234 if($('.shippingCalc').length) { 1235 var _attr1 = $('.shippingCalc').find('input').attr('onclick'); 1236 $('.shippingCalc').find('input').attr('onclick',''); 1237 $('.shippingCalc').find('input').attr('onchange',_attr1); 1238 } 1239 $('#catCartDetails .shopping-table').data('enabled', true); 1240 } 1241 1242 resetShopingCart(); 1243 }, 40); 1244 } 1245 } 1246 }, 1247 multi_step : { 1248 initMultiStepShoppingCart : function() { 1249 var condition = $('.shoppingCartMultiStepHolder').size() 1250 // && false 1251 ;init(condition); 1252 1253 function init(condition) { 1254 if(condition || condition == null) { 1255 $('.goNext2Step').click(function() { 1256 if($('#check-shipping').prop('checked')) { 1257 $('#BillingAddress').val($('#ShippingAddress').val()); 1258 $('#BillingCity').val($('#ShippingCity').val()); 1259 $('#BillingState').val($('#ShippingState').val()); 1260 $('#BillingZip').val($('#ShippingZip').val()); 1261 $('#BillingCountry').val($('#ShippingCountry').val()); 1262 } 1263 1264 if(step1Validation()) { 1265 $('.goBack1Step').hide(); 1266 $('.goNext2Step').hide(); 1267 $('.section-2').hide(); 1268 $('.goBack2Step').fadeIn(); 1269 $('.payBtn').fadeIn(); 1270 $('.section-3').fadeIn(); 1271 $('[data-step="2"]').removeClass('active'); 1272 $('[data-step="3"]').addClass('active'); 1273 $('body,html').animate({ 1274 scrollTop:0 1275 }, 100); 1276 } 1277 1278 return false; 1279 }); 1280 1281 $('.goBack2Step').click(function() { 1282 $('.goBack2Step').hide(); 1283 $('.payBtn').hide(); 1284 $('.section-3').hide(); 1285 $('.goBack1Step').fadeIn(); 1286 $('.goNext2Step').fadeIn(); 1287 $('.section-2').fadeIn(); 1288 $('[data-step="2"]').addClass('active'); 1289 $('[data-step="3"]').removeClass('active'); 1290 $('body,html').animate({ 1291 scrollTop:0 1292 }, 100); 1293 1294 return false; 1295 }); 1296 } 1297 } 1298 1299 function step1Validation() { 1300 var why = ''; 1301 var theForm = document.getElementById('catwebformform42059'); 1302 var validationTrigger = ''; 1303 1304 if (theForm.FirstName) { 1305 why += isEmpty(theForm.FirstName.value, "First Name"); 1306 validationTrigger = isEmpty(theForm.FirstName.value, "First Name"); 1307 1308 if(validationTrigger != '') { 1309 $(theForm.FirstName).addClass('error'); 1310 validationTrigger = ''; 1311 } 1312 } 1313 if (theForm.LastName) { 1314 why += isEmpty(theForm.LastName.value, "Last Name"); 1315 validationTrigger = isEmpty(theForm.LastName.value, "First Name"); 1316 1317 if(validationTrigger != '') { 1318 $(theForm.LastName).addClass('error'); 1319 validationTrigger = ''; 1320 } 1321 } 1322 if (theForm.EmailAddress) { 1323 why += checkEmail(theForm.EmailAddress.value); 1324 validationTrigger = checkEmail(theForm.EmailAddress.value); 1325 1326 if(validationTrigger != '') { 1327 $(theForm.EmailAddress).addClass('error'); 1328 validationTrigger = ''; 1329 } 1330 } 1331 if (theForm.ShippingAddress) { 1332 why += isEmpty(theForm.ShippingAddress.value, "Shipping Address"); 1333 validationTrigger = isEmpty(theForm.ShippingAddress.value, "Phone number"); 1334 1335 if(validationTrigger != '') { 1336 $(theForm.ShippingAddress).addClass('error'); 1337 validationTrigger = ''; 1338 } 1339 } 1340 if (theForm.ShippingCity) { 1341 why += isEmpty(theForm.ShippingCity.value, "Shipping City"); 1342 validationTrigger = isEmpty(theForm.ShippingCity.value, "Phone number"); 1343 1344 if(validationTrigger != '') { 1345 $(theForm.ShippingCity).addClass('error'); 1346 validationTrigger = ''; 1347 } 1348 } 1349 if (theForm.ShippingState) { 1350 why += isEmpty(theForm.ShippingState.value, "Shipping State"); 1351 validationTrigger = isEmpty(theForm.ShippingState.value, "Phone number"); 1352 1353 if(validationTrigger != '') { 1354 $(theForm.ShippingState).addClass('error'); 1355 validationTrigger = ''; 1356 } 1357 } 1358 if (theForm.ShippingZip) { 1359 why += isEmpty(theForm.ShippingZip.value, "Shipping Zip"); 1360 validationTrigger = isEmpty(theForm.ShippingZip.value, "Phone number"); 1361 1362 if(validationTrigger != '') { 1363 $(theForm.ShippingZip).addClass('error'); 1364 validationTrigger = ''; 1365 } 1366 } 1367 if (theForm.ShippingCountry) { 1368 why += checkDropdown(theForm.ShippingCountry.value, "Shipping Country"); 1369 validationTrigger = checkDropdown(theForm.ShippingCountry.value, "Shipping Country"); 1370 1371 if(validationTrigger != '') { 1372 $(theForm.ShippingCountry).addClass('error'); 1373 validationTrigger = ''; 1374 } 1375 } 1376 if (theForm.BillingAddress) { 1377 why += isEmpty(theForm.BillingAddress.value, "Billing Address"); 1378 validationTrigger = isEmpty(theForm.BillingAddress.value, "Billing Address"); 1379 1380 if(validationTrigger != '') { 1381 $(theForm.BillingAddress).addClass('error'); 1382 validationTrigger = ''; 1383 } 1384 } 1385 if (theForm.BillingCity) { 1386 why += isEmpty(theForm.BillingCity.value, "Billing City"); 1387 validationTrigger = isEmpty(theForm.BillingCity.value, "Billing Address"); 1388 if(validationTrigger != '') { 1389 $(theForm.BillingCity).addClass('error'); 1390 validationTrigger = ''; 1391 } 1392 } 1393 if (theForm.BillingState) { 1394 why += isEmpty(theForm.BillingState.value, "Billing State"); 1395 validationTrigger = isEmpty(theForm.BillingState.value, "Billing Address"); 1396 1397 if(validationTrigger != '') { 1398 $(theForm.BillingState).addClass('error'); 1399 validationTrigger = ''; 1400 } 1401 } 1402 if (theForm.BillingZip) { 1403 why += isEmpty(theForm.BillingZip.value, "Billing Zip"); 1404 validationTrigger = isEmpty(theForm.BillingZip.value, "Billing Address"); 1405 1406 if(validationTrigger != '') { 1407 $(theForm.BillingZip).addClass('error'); 1408 validationTrigger = ''; 1409 } 1410 } 1411 if (theForm.BillingCountry) { 1412 why += checkDropdown(theForm.BillingCountry.value, "Billing Country"); 1413 validationTrigger = checkDropdown(theForm.BillingCountry.value, "Billing Country"); 1414 1415 if(validationTrigger != '') { 1416 $(theForm.BillingCountry).addClass('error'); 1417 validationTrigger = ''; 1418 } 1419 } 1420 1421 if (why != "") { 1422 //alert(why); 1423 return false; 1424 } 1425 else 1426 { 1427 return true; 1428 } 1429 } 1430 } 1431 }, 1432 secure_zone : { 1433 logInFancy : function() { 1434 $('.logInLightbox').fancybox({ 1435 afterLoad: function(current, previous) { 1436 // handle custom close button in inline modal 1437 if(current.href.indexOf('#') === 0) { 1438 jQuery(current.href).find('a.close').off('click.fb').on('click.fb', function(e){
1439 e.preventDefault(); 1440 jQuery.fancybox.close(); 1441 }); 1442 } 1443 } 1444 }); 1445 } 1446 }, 1447 reservation : { 1448 reserved_tables : function() { 1449 var condition = $('.reservationTablesItem').size() && $('.reservation-form').size() 1450 // && false 1451 ;init(condition); 1452 1453 function init(condition) { 1454 if(condition || condition == null) { 1455 $('.reservationTablesItem a').click(function() { 1456 $(this).closest('.reservationTablesItem').toggleClass('selected'); 1457 var number = ''; 1458 1459 $('.reservationTablesItem.selected').each(function() { 1460 number += $(this).data('number') + ' '; 1461 }); 1462 1463 $('#TableNumber').val(number); 1464 1465 return false; 1466 }); 1467 } 1468 } 1469 } 1470 1471 }, 1472 menu_1 : { 1473 menu_1_filtration : function() { 1474 var condition = $('.menuListFiltration').size() 1475 // && false 1476 ;init(condition); 1477 1478 function init(condition) { 1479 if(condition || condition == null) { 1480 var $container = $('.menuListFiltration'); 1481 1482 $container.isotope({ 1483 itemSelector: '.col-3', 1484 animationEngine: 'best-available', 1485 transitionDuration : '0.6s', 1486 masonry: { 1487 columnWidth: '.col-3' 1488 } 1489 }); 1490 1491 $('.sortListHolder a').on( 'click', function() { 1492 var _this = $(this); 1493 var filterValue = _this.closest('li').attr('data-filter'); 1494 1495 $('.sortListHolder li').removeClass('active'); 1496 _this.closest('li').addClass('active'); 1497 1498 $container.isotope({ filter: filterValue }); 1499 1500 return false; 1501 }); 1502 1503 $('.sortListHolder a').eq(0).trigger('click'); 1504 } 1505 } 1506 } 1507 } 1508 } 1509})();
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.