PageSourceSearch

https://partizan.sk/templates/hotel/js/scripts-head.js?v=1791179774

js partizan.sk collected 2026-10-05 05:57:15 UTC 7,703 bytes, 350 lines download raw bytes

1var baseURL = window.location.origin + window.location.pathname;
2var lang = $('html').attr("lang");
3let urlprefix = "";
4let ssid = "";
5if($("html").attr("sid")){ssid = $("html").attr("sid");}
6/*if($("html").attr("hid")){urlprefix = "/"+$("html").attr("hid");}*/
7
8var error_strings = {
9	sk : {
10		email_wrong: "Zadali ste neplatnú e-mailovú adresu.",
11		phone_wrong: "Telefónne číslo musíte zadať vo formáte +xxx xxx xxx xxx.",
12		field_required: "Toto pole je povinné.",
13		field_too_short: "Nedostatočný počet znakov.",
14		field_too_long: "Prekročili ste maximálny počet znakov."
15	},
16	en : {
17		email_wrong: "This is not a valid e-mail address.",
18		phone_wrong: "Phone number is required in +xxx xxx xxx xxx format.",
19		field_required: "This field is required.",
20		field_too_short: "Insufficient number of characters.",
21		field_too_long: "You have exceeded the maximum number of characters."
22	}
23};
24
25var strings = {
26	sk : {
27		massage_choose_time: "Zvoľte si čas procedúry",
28		month_short : {
29			0: "Jan",
30			1: "Feb",
31			2: "Mar",
32			3: "Apr",
33			4: "Máj",
34			5: "Jún",
35			6: "Júl",
36			7: "Aug",
37			8: "Sep",
38			9: "Okt",
39			10: "Nov",
40			11: "Dec"
41		},
42		month : {
43			0: "Január",
44			1: "Február",
45			2: "Marec",
46			3: "Apríl",
47			4: "Máj",
48			5: "Jún",
49			6: "Júl",
50			7: "August",
51			8: "September",
52			9: "Október",
53			10: "November",
54			11: "December"
55		},
56		day_short : {
57			0: "Ne",
58			1: "Po",
59			2: "Ut",
60			3: "St",
61			4: "Å t",
62			5: "Pi",
63			6: "So"
64		},
65		day : {
66			0: "Nedeľa",
67			1: "Pondelok",
68			2: "Utorok",
69			3: "Streda",
70			4: "Å tvrtok",
71			5: "Piatok",
72			6: "Sobota"
73		},
74		years_one: "rok",
75		years_multiple: "roky",
76		years_more: "rokov",
77		nights_one: "noc",
78		nights_multiple: "noci",
79		nights_more: "nocí"
80	},
81	en : {
82		massage_choose_time: "Choose the time of the procedure",
83		month_short : {
84			0: "Jan",
85			1: "Feb",
86			2: "Mar",
87			3: "Apr",
88			4: "May",
89			5: "Jun",
90			6: "Jul",
91			7: "Aug",
92			8: "Sep",
93			9: "Oct",
94			10: "Nov",
95			11: "Dec",
96		},
97		month : {
98			0: "January",
99			1: "February",
100			2: "March",
101			3: "April",
102			4: "May",
103			5: "June",
104			6: "July",
105			7: "August",
106			8: "September",
107			9: "October",
108			10: "November",
109			11: "December"
110		},
111		day_short : {
112			0: "Su",
113			1: "Mo",
114			2: "Tu",
115			3: "We",
116			4: "Th",
117			5: "Fr",
118			6: "Sa"
119		},
120		day : {
121			0: "Sunday",
122			1: "Monday",
123			2: "Tuesday",
124			3: "Wednesday",
125			4: "Thursday",
126			5: "Friday",
127			6: "Saturday"
128		},
129		years_one: "year",
130		years_multiple: "years",
131		years_more: "years",
132		nights_one: "night",
133		nights_multiple: "nights",
134		nights_more: "nights"
135	}
136};
137
138var ajax_request;
139var announcements_timer;
140
141
142
143
144
145
146/*** COOKIES ***/
147if(!Cookies.get('disabled_notifications')){Cookies.set('disabled_notifications', [], { expires: 1 });}
148if(!Cookies.get('disabled_announcements')){Cookies.set('disabled_announcements', [], { expires: 1 });}
149if(!Cookies.get('disabled_popups')){Cookies.set('disabled_popups', [], { expires: 1 });}
150
151
152function cookieController_check(cookie_name,value){
153	if($.inArray(String(value), cookieController_items(cookie_name)) == -1){
154		return true;
155	}else{
156		return false;
157	}
158}
159
160function cookieController_push(cookie_name,value){
161	let array = cookieController_items(cookie_name);
162	array.push(value);
163	Cookies.set(cookie_name, array, { expires: 1 });
164}
165
166function cookieController_items(cookie_name){
167	let cookie_value = Cookies.get(cookie_name);
168	if(!cookie_value || cookie_value.length === 0){
169		return [];
170	}
171	return cookie_value.split(',');
172}
173
174/*** END ***/
175
176
177
178
179
180/*** NOTIFICATIONS ***/
181function setNotificationsView(){
182	let el_notification_bars = $(".notification-bar");
183	el_notification_bars.each(function(index){
184		let disable_id = $(this).data("id");
185		let notification_id = $(this).data("notification");
186		let fixed_class = $(this).data("fixed");
187		let height = $(this).height();
188
189		if($("."+fixed_class).length){
190			$(this).addClass("fixed");
191		}
192
193		//show only if not disabled in cookies
194		if(cookieController_check('disabled_notifications',disable_id)){
195			$("body").css("padding-top",height+"px");
196			$("body").addClass(notification_id);
197			controllNotificationTextRoll($(this));
198			$(this).removeClass("disabled");
199		}
200	});
201}
202
203function controllNotificationView(){
204	let el_notification_bars = $(".notification-bar:not(.disabled)");
205	el_notification_bars.each(function(index){
206		let height = $(this).height();
207		$("body").css("padding-top",height+"px");
208
209		controllNotificationTextRoll($(this));
210	});
211}
212
213function controllNotificationTextRoll(el){
214	let col_width = el.find(".col-content").width();
215	let text_width = el.find(".step.first").width();
216	let playing = el.find(".text-animation").hasClass("playing");
217
218	if(text_width >= col_width && !playing){
219		let el_copy = el.find(".step.first").clone();
220		el_copy.removeClass("first").addClass("second");
221
222		el.find(".text-animation").append(el_copy).addClass("playing");
223		el.find(".text-animation-wrapper").addClass("playing");
224	}else if(text_width < col_width){
225		el.find(".text-animation .second").remove();
226		el.find(".text-animation").removeClass("playing");
227		el.find(".text-animation-wrapper").removeClass("playing");
228	}
229}
230/*** END ***/
231
232
233
234
235
236/*** COMMON FUNCTIONS ***/
237function getUrlParam(name){
238	var url = new URL(window.location.href);
239	return url.searchParams.get(name);
240}
241
242function getMonthName(number){
243	return strings[lang]['month_short'][number];
244}
245
246function getWeekdayName(number){
247	return strings[lang]['day'][number];
248}
249
250function addZero(num){
251    if(num < 10){return "0" + num;}else{return num;}
252}
253
254function formatDateSK(d) {
255	var dateinput = new Date(d);
256	var date = dateinput; 
257	var day = ('0' + date.getDate()).slice(-2);
258	var month = ('0' + (date.getMonth() + 1)).slice(-2);
259	var year = date.getFullYear();
260	return day + "." + month + "." + year;
261}
262
263function formatDateDB(d) {
264	var date = new Date(d);
265	var yr = date.getFullYear();
266	var month = (date.getMonth()+1) < 10 ? '0' + (date.getMonth()+1) : (date.getMonth()+1);
267	var day = date.getDate()  < 10 ? '0' + date.getDate()  : date.getDate();
268	var newDate = yr + '-' + month + '-' + day;
269	return newDate;
270}
271
272function currencyFormat(num) {
273    return (
274        num
275        .toFixed(2)
276        .replace('.', ',')
277        .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1 ') + ' €'
278    )
279}
280
281function currencyFormatNum(num) {
282    return (
283        num
284        .toFixed(2)
285        .replace('.', ',')
286        .replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1 ')
287    )
288}
289
290function ajax(method,url,data,do_return){
291	let is_cart_add = false;
292	if(url == '/basket' || url == '/rentbasket'){
293		is_cart_add = true;
294	}
295
296	let cart_reload = false;
297	if(is_cart_add || url == '/updatecartitem' || url == '/remove' || url == '/updaterentitem' || url == '/removecoupon'){
298		cart_reload = true;
299	}
300
301	if(is_cart_add){
302		$('#modal-cart .cart-wrapper').html("");
303		loader_modal(1);
304		$('#modal-cart').modal("show");
305	}
306
307	if(ajax_request){ajax_request.abort();}
308
309	if(do_return){
310		return $.ajax({
311			url: url,
312			type: method,
313			data: data
314		});
315	}else{
316		ajax_request = $.ajax({
317			url: url,
318			type: method,
319			data: data,
320			success: function (response){
321				if(cart_reload){
322					reloadCarts();
323				}
324			},
325			error: function (){
326				ajax_error();
327			}
328		});
329	}
330	
331}
332
333function ajax_error(){
334	console.log('There is an error in your Ajax call!');
335	loader_modal(0);
336	loader(0);
337	$('#modal-cart').modal("hide");
338}
339
340function showToast(success,title,text){
341	if(success){
342		$("#liveToast .icon").html('<i class="ti ti-info-circle"></i>');
343	}else{
344		$("#liveToast .icon").html('<i class="ti ti-circle-x"></i>');
345	}
346	$("#liveToast .toast-title").html(title);
347	$("#liveToast .toast-body").html(text);
348	$("#liveToast").toast("show");
349}
350/*** END ***/

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.