/*! * webshop.js */ $(document).ready(function(){ if (ActiveNavbar != '') { $('#' + ActiveNavbar).addClass("active"); } // Seite in Navbar markieren $('[data-toggle="tooltip"]').tooltip({ // Tooltips aktivieren delay: { "show": 50, "hide": 50 }, placement: 'bottom', }); var WK_content = $('[id*="nav-warenkorb-inhalt"]'); $("#nav-warenkorb").popover({ // Tooltip für Warenkorblink in Navbar //delay: { "show": 50, "hide": 750 }, trigger: 'click', html: true, placement: 'bottom', title: WarenkorbLinkTitle, //content: $('#nav-warenkorb-inhalt').html() content: function () { return WK_content.html(); } }); //if (window.location.pathname == '/warenkorb.php' || $("#nav-warenkorb-badge").text() == '0') { if (window.location.pathname == '/warenkorb.php') { $("#nav-warenkorb").popover('disable'); $("#nav-warenkorb").click(function () { $(location).attr("href","warenkorb.php"); }); } $(".shopping-cart").hover( // Warenkorbsymbol in Navigation function() { $(this).addClass("shopping-cart-hover"); $("#nav-warenkorb-badge").addClass("shopping-cart-badge-hover"); }, function() { $(this).removeClass("shopping-cart-hover"); $("#nav-warenkorb-badge").removeClass("shopping-cart-badge-hover"); } ); $(".buy").hover( // Warenkorbsymbol zum bestellen function() { $(this).addClass("buy-hover"); }, function() { $(this).removeClass("buy-hover"); } ); $(".delivery").hover( // Warenkorbsymbol zum bestellen function() { $(this).addClass("delivery-hover"); }, function() { $(this).removeClass("delivery-hover"); } ); }); function changeBrand() { $.dialog({ boxWidth: '860px', useBootstrap: true, title: changeBrandTitle, columnClass: 'col-md-6 col-md-offset-3 select_brand', closeIcon: false, backgroundDismiss: 'close', content: '        
        
        
        ', onContentReady: function () { $("#BrandPicFiat").click(function () { setBrand('Fiat'); }); $("#BrandPicFiatProfessional").click(function () { setBrand('FiatProfessional'); }); $("#BrandPicAbarth").click(function () { setBrand('Abarth'); }); $("#BrandPicAlfa").click(function () { setBrand('AlfaRomeo'); }); $("#BrandPicJeep").click(function () { setBrand('Jeep'); }); $("#BrandPicLancia").click(function () { setBrand('Lancia'); }); $("#BrandPicLeapmotor").click(function () { setBrand('Leapmotor'); }); $("#BrandPicPeugeot").click(function () { setBrand('Peugeot'); }); $("#BrandPicCitroen").click(function () { setBrand('Citroen'); }); $("#BrandPicDS").click(function () { setBrand('DS'); }); $("#BrandPicOpel").click(function () { setBrand('Opel'); }); }, }); } function setBrand(Brand) { $.ajax({ type: "GET", url: "./ajax/set_FahrzeugHersteller.php", data: { "FahrzeugHersteller": Brand }, success: function (data) { if (data["Status"] == 'OK') { if (typeof TargetURL !== 'undefined' && TargetURL != '') { $(location).attr("href", TargetURL); } else { $(location).attr("href", 'kpl_fahrzeugauswahl.php'); } } } }); } function setLanguage(Language) { $.ajax({ type: "GET", url: "./ajax/set_Sprache.php", data: { "Sprache": Language, "URL": window.location.pathname }, success: function (data) { if (data["Status"] == 'OK') { if(window.location.pathname == '/kpl_detail.php') { document.SearchForm.submit(); } else { $(location).attr("href",data["URL"]); } } } }); }