'; return html;	} function codeAddress() { var address = document.getElementById('_genelecsitedealermap_addressInput').value; geocoder.geocode( { 'address': address}, function(results, status) { if (status == 'OK') { _genelecsitedealermap_updateUrl("address", results[0].formatted_address); } else { console.log('Geocode was not successful for the following reason: ' + status); } }); }; window.onresize = function() { var currCenter = map.getCenter(); google.maps.event.trigger(map, 'resize'); map.setCenter(currCenter); }; function owlInitialize() { $('.map-carousel').owlCarousel('destroy'); if ($(window).outerWidth() < 992) { $('.map-carousel').owlCarousel({ loop:false, nav:true, dots:false, margin:5, lazyLoad:true, navText : ['',''], responsive:{ 0:{items:1, slideBy:1}, 450:{items:2, slideBy:2}, 800:{items:3, slideBy:3} }, }); }else{ $('.map-carousel').owlCarousel('destroy'); } }; function owlEventInitialize() { $('.event-carousel').owlCarousel('destroy'); if ($(window).outerWidth() < 992) { $('.event-carousel').owlCarousel({ loop:false, nav:true, dots:false, margin:5, lazyLoad:true, navText : ['',''], responsive:{ 0:{items:1, slideBy:1}, 450:{items:2, slideBy:2}, 800:{items:3, slideBy:3} }, }); }else{ $('.event-carousel').owlCarousel('destroy'); } }; $(window).resize(function() { owlInitialize(); owlEventInitialize(); classChangeInitialize(); }); $(document).ready(function(){ classChangeInitialize(); }); function classChangeInitialize() { if ($(window).outerWidth() < 992) { $('#_genelecsitedealermap_list').removeClass('scrollbar'); _genelecsitedealermap_hideModal(); }else if ($(window).outerWidth() >= 992) { $('#_genelecsitedealermap_list').addClass('scrollbar'); } }; $('#_genelecsitedealermap_eventResult:empty').hide(); function dealerInfoBoxHeight() { var maxHeight = Math.max.apply(null, $('.dealer-info-box').map(function(){return $(this).height()})); $('.dealer-info-box').height(maxHeight); };