/* Slovenian initialisation for the jQuery UI date picker plugin. */ /* Written by Jaka Jancar (jaka@kubje.org). */ /* c = č, s = š z = ž C = Č S = Š Z = Ž */ jQuery(function($){ $.datepicker.regional['sl'] = { closeText: 'Zapri', prevText: '<Prejšnji', nextText: 'Naslednji>', currentText: 'Trenutni', monthNames: ['Januar','Februar','Marec','April','Maj','Junij', 'Julij','Avgust','September','Oktober','November','December'], monthNamesShort: ['Jan','Feb','Mar','Apr','Maj','Jun', 'Jul','Avg','Sep','Okt','Nov','Dec'], dayNames: ['Nedelja','Ponedeljek','Torek','Sreda','Četrtek','Petek','Sobota'], dayNamesShort: ['Ned','Pon','Tor','Sre','Čet','Pet','Sob'], dayNamesMin: ['Ne','Po','To','Sr','Če','Pe','So'], dateFormat: 'dd.mm.yy', firstDay: 1, isRTL: false}; $.datepicker.setDefaults($.datepicker.regional['sl']); $.timepicker.regional['sl'] = { timeOnlyTitle: 'Выберите время', timeText: 'Čas obiska', hourText: 'Ura', minuteText: 'Minuta', secondText: 'Sekunda', millisecText: 'Миллисекунды', timezoneText: 'Часовой пояс', currentText: 'Сейчас', closeText: 'Закрыть', timeFormat: 'HH:mm', amNames: ['AM', 'A'], pmNames: ['PM', 'P'], isRTL: false }; $.timepicker.setDefaults($.timepicker.regional['sl']); }); $(document).ready(function() { if ($("body.intro-page").length != 0) { var clickedCardIndex = 0; $(".quick-link").on('click', function(e) { e.preventDefault(); clickedCardIndex = $(".quick-link").index(this); $(document).trigger('productCardClick', $(".quick-link").index(this)); }); $(".quick-links .left-arrow").on('click', function(e) { if($(".quick-link").eq(clickedCardIndex-1).hasClass("active")) { clickedCardIndex = clickedCardIndex - 2; } else { clickedCardIndex = clickedCardIndex - 1; } if(clickedCardIndex < 0) { clickedCardIndex = $(".quick-link").length-1; } $(document).trigger('productCardClick', clickedCardIndex); }); $(".quick-links .right-arrow").on('click', function(e) { if($(".quick-link").eq(clickedCardIndex+1).hasClass("active") && clickedCardIndex == $(".quick-link").length-2) { clickedCardIndex = 0; } else { clickedCardIndex = clickedCardIndex + 1; } if(clickedCardIndex > $(".quick-link").length-1) { clickedCardIndex = 0; } $(document).trigger('productCardClick', clickedCardIndex); }); $(window).resize(function() { $(document).trigger('productCardClick', clickedCardIndex); }); } if ($("body.product-page").length != 0) { $(".ugodnosti .title-container").click(function() { $(".ugodnosti .text").slideToggle( "slow", function() { }); }) if ($.trim($(".ugodnosti .text :visible").text()).length == 0) { $(".ugodnosti").hide(); } $(window).resize(function() { $(".ugodnosti").show(); if ($(".ugodnosti .text.visible-desktop").is(":visible") && $.trim($(".ugodnosti .text.visible-desktop").text()).length == 0) { $(".ugodnosti").hide(); } if ($(".ugodnosti .text.visible-mobile").is(":visible") && $.trim($(".ugodnosti .text.visible-mobile").text()).length == 0) { $(".ugodnosti").hide(); } }); } if ($("body.segment-page").length != 0) { $.each($(".product-item"), function(ind, val) { if(ind%2 == 1) { $(this).parent().after('
'); } }); } $("header #top-right-div img").click(function() { window.location.href = "/iskanje?q=" + $("header #top-right-div input").val(); }); $("header #top-right-div input").keypress(function(event) { if (event.which == 13) { window.location.href = "/iskanje?q=" + $("header #top-right-div input").val(); } }); $(document).on("productCardClick", function(e, index) { $(".quick-link").removeClass("active"); $(".featured-quick-link").hide(); if( $(".device-xs").is(":visible") || $(".device-sm").is(":visible")) { $(".quick-link").eq(index).addClass("active"); $(".featured-quick-link").eq(index).show(); } else { if(index < $(".quick-link").length - 1) { $(".quick-link").eq(index).addClass("active"); $(".quick-link").eq(index+1).addClass("active"); $(".featured-quick-link").eq(index).show(); $(".featured-quick-link").eq(index+1).show(); } else { $(".quick-link").eq(index).addClass("active"); $(".quick-link").eq(index-1).addClass("active"); $(".featured-quick-link").eq(index).show(); $(".featured-quick-link").eq(index-1).show(); } } }); }); $(window).load(function() { if ($("body.intro-page").length != 0) { $(".quick-link").eq(0).trigger('productCardClick', 0); } });