1$(function() { 2 3 $(".slider").flexslider({ 4 animation: "slide", 5 directionNav: false, 6 }); 7 8 // Equalize Gallery 9 equalizeBoxes(".gallery ", ".thumbnail"); 10 11 // Booking Prices 12 updateBookingPrices() 13 14 $("select[name='id_tour2date']").on("change", function() { 15 updateIdTour2date(); 16 updateBookingPrices(); 17 }); 18 19 $("input[name='couponvalue']").on("change", function() { 20 updateBookingPrices(); 21 }); 22 23 $("select[name='adults']").on("change", function() { 24 updateBookingPrices(); 25 }); 26 27 $("select[name='children']").on("change", function() { 28 updateBookingPrices(); 29 }); 30 31 $("select[name='delivery']").on("change", function() { 32 updateBookingPrices(); 33 }); 34 35}); 36 37$(window).on("resize", function() { 38 39 equalizeBoxes(".gallery ", ".thumbnail"); 40 41}); 42 43 44function updateIdTour2date() { 45 46 idTour2date = $("select[name='id_tour2date'] option:selected").data("id-tour2date"); 47 $("input[name='id_tour2date']").val(idTour2date); 48 49} 50 51function updateBookingPrices() { 52 53 var price_total = 0; 54 var price_adult = 0; 55 var price_children = 0; 56 var price_delivery = 0; 57 var number_adults = 0; 58 var number_children = 0; 59 60 // hide total 61 $(".price-total").addClass("hidden"); 62 63 // booking 64 if($("select[name='id_tour2date']").length) { 65 price_adult = $("select[name='id_tour2date'] option:selected").data("price-adult"); 66 price_children = $("select[name='id_tour2date'] option:selected").data("price-children"); 67 $(".booking-price-adult").html(price_adult); 68 $(".booking-price-children").html(price_children); 69 } 70 71 // coupon 72 if($("input[name='coupon']").length) { 73 price_total = parseFloat($("input[name='couponvalue']").val()); 74 } 75 76 // adults 77 if($("select[name='adults']").length) { 78 number_adults = $("select[name='adults']").val(); 79 if(number_adults > 0) { 80 price_total += number_adults * price_adult; 81 } 82 } 83 84 // children 85 if($("select[name='children']").length) { 86 number_children = $("select[name='children']").val(); 87 if(number_children > 0) { 88 price_total += number_children * price_children; 89 } 90 } 91 92 // delivery 93 if($("select[name='delivery']").length) { 94 price_delivery = $("select[name='delivery'] option:selected").data("price-delivery"); 95 if(price_delivery > 0) { 96 price_total += price_delivery; 97 } 98 } 99 100 // show total 101 price_total = priceFormat(price_total); 102 $(".price-total").html(price_total); 103 $(".price-total").removeClass("hidden"); 104 105} 106 107 108// Price Format 109function priceFormat(price) { 110 111 price = (new Intl.NumberFormat("de-DE", { style: "currency", currency: "EUR" }).format(price)); 112 113 return price; 114 115} 116 117 118 119// Equal Boxes 120function equalizeBoxes(outer, inner) { 121 122 $(outer).each(function () { 123 $(this).find(inner).css("min-height", "0px"); 124 }); 125 126 if(getDevice() != "xs") { 127 var boxheight = 0; 128 129 $(outer).each(function () { 130 boxheight = 0; 131 var wrapper = $(this); 132 $(this).find(inner).each(function () { 133 boxheight = ($(this).outerHeight() > boxheight) ? $(this).outerHeight() : boxheight; 134 }); 135 wrapper.find(inner).css("min-height", boxheight + "px"); 136 }); 137 } 138 139}
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.