PageSourceSearch

http://harb.si/wp-content/plugins/piskotki/js/test.js?ver=4.9.26

js harb.si collected 2026-10-02 14:22:34 UTC 41,278 bytes, 1,370 lines download raw bytes

1/*
2Copyright 2012 Silktide Ltd.
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 3 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program.  If not, see <http://www.gnu.org/licenses/>
16 */
17
18
19var cc =
20{
21	version: '1.0.5',
22	initobj: false,
23	ismobile: false,
24	setupcomplete: false,
25	allasked: false,
26	checkedlocal: false,
27	checkedremote: false,
28	remoteresponse: false,
29	frommodal: false,
30	hassetupmobile: false,
31	sessionkey: false,
32	noclosewin: false,
33	closingmodal: false,
34	jqueryattempts: 0,
35	reloadkey: false,
36	forcereload: false,
37	allagree: false,
38	cookies: {},
39	uniqelemid: 0,
40	executionblock: 0,
41	defaultCookies: { social: {}, analytics: {}, advertising: {}},
42	remoteCookies: {},
43	approved: {},
44	bindfunctions: {},
45	settings: {
46		refreshOnConsent: false,
47		style: "dark",
48		bannerPosition: "top",
49		clickAnyLinkToConsent: false,
50		privacyPolicy: false,
51		collectStatistics: false,
52		tagPosition: 'bottom-right',
53		useSSL: false,
54		serveraddr: 'http://cookieconsent.silktide.com/',
55		clearprefs: false,
56		consenttype: 'explicit',
57		onlyshowbanneronce: false,
58		hideallsitesbutton: false,
59		hideprivacysettingstab: false,
60		scriptdelay: 800,
61		testmode: false
62	},
63
64strings: {
65		jqueryWarning: "Potrebujete vsaj jQuery 1.4.4.",
66		noJsBlocksWarning: "Izgleda da niste izpolnili vseh nastavitev za piškotke.",
67		noKeyWarning: "Developer: Warning! You have set the plugin to only show within the EU, but you have not provided an API key for the IP Info DB.  Check the documentation at http://piskotki.net for more information",
68		invalidKeyWarning: "Developer: Warning! You must provide a valid API key for IP Info DB.  Check the documentation at http://piskotki.net for more information",
69		necessaryDefaultTitle: "Sistemski piškotki",
70		socialDefaultTitle: "Socialna omrežja",
71		analyticsDefaultTitle: "Statistika",
72		advertisingDefaultTitle: "Oglaševanje",
73		defaultTitle: "Drugi piškotki",
74		necessaryDefaultDescription: "Nekateri piškotki so potrebni za pravilno delovanje spletne strani. Teh ni mogoče izklopiti.",
75		socialDefaultDescription: "Dovolim Facebooku, Twitterju in ostalim socialnim omrežjem, da prikazujejo meni prilagojene vtičnike.",
76		analyticsDefaultDescription: "Dovoljujem spremljanje statistike obiska.",
77		advertisingDefaultDescription: "Dovoljujem prikazovanje meni prilagojenih oglasov.",
78		defaultDescription: "Dovoljujem uporabo ostalih piškotkov.",
79		notificationTitle: "Spletna stran uporablja piškotke. Stopnjo zasebnosti lahko po želji spremenite. ",
80		notificationTitleImplicit: "Spletna stran uporablja piškotke. Stopnjo zasebnosti lahko po želji spremenite.",
81		poweredBy: "Več informacij o piškotkih, kako delujejo in kako vplivajo na vašo zasebnost na spletu",
82		privacyPolicy: "Pogoji uporabe",
83		learnMore: "Več informacij",
84		seeDetails: "poglej podrobnosti",
85		seeDetailsImplicit: " podrobnosti",
86		hideDetails: "skrij podrobnosti",
87		savePreference: 'Shrani',
88		saveForAllSites: '',
89		allowCookies: 'Dovoli piškotke',
90		allowCookiesImplicit: 'Zapri',
91		allowForAllSites: '',
92		customCookie: 'Dovolite nam uporabo posebnih piškotkov, s katerimi nudimo boljšo uporabniško izkušnjo pri brskanju po spletni strani.',
93		privacySettings: "Zasebnost",
94		privacySettingsDialogTitleA: "Nastavitve zasebnosti",
95		privacySettingsDialogTitleB: "za to spletno stran",
96		privacySettingsDialogSubtitle: "Ta spletna stran uporablja piškotke.",
97		closeWindow: "Zapri okno",
98		changeForAllSitesLink: "",
99		preferenceUseGlobal: '',
100		preferenceConsent: "Strinjam se",
101		preferenceDecline: "Ne strinjam se",
102		preferenceAsk: 'Vprašaj vsakič',
103		preferenceAlways: "Vedno dovoli",
104		preferenceNever: "Nikoli ne dovoli",
105		notUsingCookies: "Ta spletna stran ne uporablja piškotkov.",
106		clearedCookies: "Piškotki so bili odstranjeni, ponovno naložite spletn
106o stran, da bodo vaše nastavitve začele delovati.",
107		allSitesSettingsDialogTitleA: "Nastavitve zasebnosti",
108		allSitesSettingsDialogTitleB: "",
109		allSitesSettingsDialogSubtitle: "",
110		backToSiteSettings: "Nazaj na nastavitve"
111	},
112
113	onconsent: function(cookieType, input)
114	{
115		if(cc.isfunction(input))
116		{
117			fn = input;
118		}
119		else
120		{
121			scriptname = input;
122			fn = function()
123			{
124				cc.insertscript(scriptname);
125			};
126		}
127		if(cc.cookies && cc.cookies[cookieType] && cc.cookies[cookieType].approved)
128		{
129			cc.cookies[cookieType].executed = true;
130			fn();
131		} else {
132			if(window.jQuery)
133			{
134				jQuery(document).bind("cc_"+cookieType, fn);
135			} else {
136				if(cc.bindfunctions[cookieType])
137				{
138					cc.bindfunctions[cookieType][cc.bindfunctions[cookieType].length] = fn;
139				} else {
140					cc.bindfunctions[cookieType] = new Array(fn);
141				}
142			}
143		}
144	},
145
146	geturlparameter: function (name)
147	{
148		name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
149		var regexS = "[\\?&]" + name + "=([^&#]*)";
150		var regex = new RegExp(regexS);
151		var results = regex.exec(window.location.search);
152		if(results == null)
153			return false;
154		else
155			return decodeURIComponent(results[1].replace(/\+/g, " "));
156	},
157
158	isfunction: function(functionToCheck) {
159	 var getType = {};
160	 return functionToCheck && getType.toString.call(functionToCheck) == '[object Function]';
161	},
162
163	setup: function()
164	{
165		jQuery.each(cc.bindfunctions, function(key, value) {
166			for(i = 0; i < value.length; i++)
167			{
168				jQuery(document).bind("cc_"+key, value[i]);
169			}
170		});
171		var verstr = jQuery().jquery.replace(/\./g, '');
172		while (verstr.length < 6) {
173			verstr = verstr + '0';
174		}
175		if (parseInt(verstr) < 144000)
176		{
177			//alert(cc.strings.jqueryWarning);
178		}
179		jQuery.each(cc.defaultCookies, function(key, value) {
180		
181		
182			if(key == "necessary")
183			{
184				cc.defaultCookies[key].title = cc.strings.necessaryDefaultTitle;
185				cc.defaultCookies[key].description = cc.strings.necessaryDefaultDescription;
186			}
187			else if(key == "social")
188			{
189				cc.defaultCookies[key].title = cc.strings.socialDefaultTitle;
190				cc.defaultCookies[key].description = cc.strings.socialDefaultDescription;
191			}
192			else if(key == "analytics")
193			{
194				cc.defaultCookies[key].title = cc.strings.analyticsDefaultTitle;
195				cc.defaultCookies[key].description = cc.strings.analyticsDefaultDescription;
196			}
197			else if(key == "advertising")
198			{
199				cc.defaultCookies[key].title = cc.strings.advertisingDefaultTitle;
200				cc.defaultCookies[key].description = cc.strings.advertisingDefaultDescription;
201			}
202		});
203		jQuery.each(cc.initobj.cookies, function(key, value) {
204			if(!value.title)
205			{
206			
207				if(key == "necessary")
208				{
209					cc.initobj.cookies[key].title = cc.strings.necessaryDefaultTitle;
210				}
211				else if(key == "social")
212				{
213					cc.initobj.cookies[key].title = cc.strings.socialDefaultTitle;
214				}
215				else if(key == "analytics")
216				{
217					cc.initobj.cookies[key].title = cc.strings.analyticsDefaultTitle;
218				}
219				else if(key == "advertising")
220				{
221					cc.initobj.cookies[key].title = cc.strings.advertisingDefaultTitle;
222				} else {
223					cc.initobj.cookies[key].title = cc.strings.defaultTitle;
224				}
225			}
226			if(!value.description)
227			{
228				if(key == "necessary")
229				{
230					cc.initobj.cookies[key].description = cc.strings.necessaryDefaultDescription;
231				}
232				else if(key == "social")
233				{
234					cc.initobj.cookies[key].description = cc.strings.socialDefaultDescription;
235				}
236				else if(key == "analytics")
237				{
238					cc.initobj.cookies[key].description = cc.strings.analyticsDefaultDescription;
239				}
240				else if(key == "advertising")
241				{
242					cc.initobj.cookies[key].description = cc.strings.advertisingDefaultDescription;
243				} else {
244					cc.initobj.cookies[key].description = cc.strings.defaultDescription;
245				}
246			}
247
248			cc.initobj.cookies[key].asked = false;
249			cc.initobj.cookies[key].approved = false;
250			cc.initobj.cookies[key].executed = false;
251
252			jQuery('.cc-button-enable-'+key).addClass('cc-link').click(cc.onlocalconsentgiven);
253		});
254		testmode = cc.geturlparameter('cctestmode');
255		if(testmode == 'accept' || testmode == 'decline')
256		{
257			cc.settings.testmode = testmode;
258		}
259
260		jQuery('.cc-button-enableall').addClass('cc-link').click(cc.onlocalconsentgiven);
261		jQuery('.cc-button-enable-all').addClass('cc-link').click(cc.onlocalconsentgiven);
262
263		for (var attrname in cc.initobj.cookies)
264		{
265			cc.cookies[attrname] = cc.initobj.cookies[attrname];
266			if(cc.settings.testmode == "accept")
267			{
268				cc.approved[attrname] = "yes";
269			}
270			if(cc.settings.testmode == "decline")
271			{
272				cc.approved[attrname] = "no";
273			}
274		}
275
276	},
277
278	initialise: function (obj)
279	{
280		cc.initobj = obj;
281		if(obj.settings !== undefined)
282		{
283			for (var attrname in obj.settings) { this.settings[attrname] = obj.settings[attrname]; }
284		}
285		if(obj.strings !== undefined)
286		{
287			for (var attrname in obj.strings) { this.strings[attrname] = obj.strings[attrname]; }
288		}
289		cc.settings.style = "cc-"+cc.settings.style;
290		cc.settings.bannerPosition = "cc-"+cc.settings.bannerPosition;
291		if(cc.settings.useSSL)
292		{
293			cc.settings.serveraddr = 'https://cookieconsent.silktide.com/';
294		}
295		if(window.jQuery)
296		{
297			cc.setupcomplete = true;
298
299			cc.setup();
300		}
301	},
302
303	calculatestatsparams: function()
304	{
305		params = "c=";
306		first = true;
307		jQuery.each(cc.initobj.cookies, function(key, value) {
308			if(first)
309			{
310				first = false;
311			} else
312			{
313				params += ";";
314			}
315			params += encodeURIComponent(key)+":";
316
317			if(cc.approved[key])
318			{
319				params += cc.approved[key];
320			} else {
321				params += "none";
322			}
323			if(value.statsid)
324			{
325				params += ":" + value.statsid;
326			}
327		});
328		if(cc.ismobile)
329		{
330			params += "&m=1";
331		} else {
332			params += "&m=0";
333		}
334		params += "&u=" + encodeURIComponent(document.URL);
335		return params;
336	},
337
338	setsessionkey: function(data)
339	{
340		cc.sessionkey = data;
341	},
342
343
344	fetchprefs: function()
345	{
346		cc.remoteresponse = false;
347		params = "?s=1";
348		if(cc.settings.collectStatistics)
349		{
350			params = "?s=1&" + cc.calculatestatsparams();
351		}
352		if(cc.settings.clearprefs)
353		{
354			params += "&v=1";
355			cc.settings.clearprefs = false;
356		}
357		//cc.insertscript(cc.settings.serveraddr+params);
358		setTimeout(function(){
359		//	if(!cc.remoteresponse)
360		//	{
361				cc.checkapproval();
362		//	}
363		}, 3000);
364		this.checkedremote = true;
365	},
366
367	responseids: function(data)
368	{
369		jQuery.each(data, function(key, value) {
370			cc.cookies[key].statsid = value;
371		});
372	},
373
374	insertscript: function(script)
375	{
376		var newfile = document.createElement('script');
377		newfile.setAttribute("type","text/javascript");
378		newfile.setAttribute("src", script);
379		document.getElementsByTagName("head")[0].appendChild(newfile);
380	},
381
382	insertscripttag: function(content)
383	{
384		var newfile = document.createElement('script');
385		newfile.setAttribute("type","text/javascript");
386		newfile.innerHTML = content;
387		document.getElementsByTagName("head")[0].appendChild(newfile);
388	},
389
390	checklocal: function()
391	{
392		this.checkedlocal = true;
393		jQuery.each(cc.cookies, function(key, value)
394		{
395			cookieval = cc.getcookie('cc_'+key);
396			if(cookieval)
397			{
398				cc.approved[key] = cookieval;
399			}
400		});
401		this.checkapproval();
402	},
403
404	response: function (data)
405	{
406		cc.remoteresponse = true
407		jQuery.each(data, function(key, value) {
408			if(cc.cookies[key] && (!cc.approved[key] || (cc.approved[key] && (cc.approved[key] == "always" || cc.approved[key] == "never"))))
409			{
410				cc.setcookie('cc_'+key, value, 365);
411			}
412		});
413
414		for (var attrname in data)
415		{
416			cc.remoteCookies[attrname] = data[attrname];
417			if(this.approved[attrname] != "yes" && this.approved[attrname] != "no")
418			{
419				this.approved[attrname] = data[attrname];
420			}
421		}
422		jQuery.each(cc.cookies, function(key, value) {
423			if(!data[key] && (cc.approved[key] == "always" || cc.approved[key] == "never"))
424			{
425				cc.cookies[key].approved = false;
426				cc.deletecookie(key);
427				delete cc.approved[key];
428			}
429		});
430
431		this.checkapproval();
432	},
433
434	deletecookie: function(key)
435	{
436		date = new Date();
437		date.setDate(date.getDate() -1);
438		document.cookie = escape("cc_"+key) + '=; path=/; expires=' + date;
439	},
440
441	reloadifnecessary: function()
442	{
443		if(cc.settings.refreshOnConsent || cc.ismobile || cc.forcereload)
444		{
445			setTimeout("location.reload(true);",50);
446		}
447	},
448
449	onkeyup: function(e)
450	{
451		if (e.keyCode == 27)
452		{
453			cc.closemodals();
454		}
455	},
456
457	closemodals: function()
458	{
459		if(!cc.closingmodal)
460		{
461			if(cc.noclosewin)
462			{
463				cc.noclosewin = false;
464			} else {
465				if(jQuery('#cc-modal').is(":visible"))
466				{
467					jQuery('#cc-modal .cc-modal-closebutton a').click();
468				}
469				if(jQuery('#cc-settingsmodal').is(":visible"))
470				{
471					jQuery('#cc-settingsmodal #cc-settingsmodal-closebutton a').click();
472				}
473			}
474		}
475	},
476
477	showbanner: function ()
478	{
479		jQuery('#cc-tag').fadeOut(null, function() {
480			jQuery(this).remove();
481		});
482		jQuery('#cc-notification').remove();
483		if(cc.ismobile)
484		{
485		   	cc.setupformobile();
486			jQuery('head').append('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">');
487			jQuery('body').html('').css("margin", 0);
488		}
489		data = '<div id="cc-notification">' +
490				'<div id="cc-notification-wrapper">' +
491				'<h2><span>'+cc.strings.notificationTitle+'</span></h2>' +
492				'<div id="cc-notification-permissions">' +
493				//'<p id="cc-notification-moreinformation"><a href="http://silktide.com/cookielaw" target="_blank">More information about cookies</a></p>' +
494				'<a id="cc-notification-logo" class="cc-logo" target="_blank" href="http://piskotki.net/kaj-so-piskotki-in-kako-delujejo/" title="'+cc.strings.poweredBy+'">Kaj so piškotki?</a> ' +
495				'</div>' +
496				'<ul class="cc-notification-buttons">' +
497
498				'<li>' +
499				'<p class="skrij" id="cc-approve-button-allsites">'+cc.strings.allowForAllSites+'</p>' +
500				'</li>' +
501				'<li>' +
502				'<a class="cc-link" href="#" id="cc-approve-button-thissite">'+cc.strings.allowCookies+'</a>' +
503				'</li>' +
504				'</ul>' +
505				'<div class="cc-clear"></div>' +
506				'</div>' +
507				'</div>';
508
509			jQuery('body').prepend(data);
510			if(cc.settings.hideallsitesbutton)
511			{
512				jQuery('#cc-approve-button-allsites').hide();
513			}
514			if(cc.settings.consenttype == 'implicit')
515			{
516				jQuery('#cc-notification h2 span').html(cc.strings.notificationTitleImplicit);
517				jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookiesImplicit);
518				jQuery('#cc-approve-button-thissite').parent().after(jQuery('#cc-approve-button-allsites').parent());
519				jQuery('#cc-approve-button-allsites').hide();
520			}
521			jQuery('#cc-notification-logo').hide();
522			if(cc.settings.privacyPolicy)
523			{
524				jQuery('#cc-notification-moreinformation').prepend('<a href="'+cc.settings.privacyPolicy+'">'+cc.strings.privacyPolicy+'</a> | ');
525			}
526			jQuery('#cc-notification').addClass(cc.settings.style).addClass(cc.settings.bannerPosition);
527			bannerh = jQuery('#cc-notification').height();
528			jQuery('#cc-notification').hide();
529			if(cc.ismobile)
530			{
531				jQuery('#cc-notification').addClass("cc-mobile");
532			}
533			jQuery('#cc-notification-permissions').prepend('<ul></ul>');
534			allcustom = true;
535			jQuery.each(cc.cookies, function(key, value) {
536				if(!value.asked)
537				{
538					jQuery('#cc-notification-permissions ul').append('<li><input type="checkbox" checked="checked" id="cc-checkbox-'+key+'" /> <label id="cc-label-'+key+'" for="cc-checkbox-'+key+'"><strong>'+value.title+'</strong> '+value.description+'</label></li>');
539					if(value.link)
540					{
541						jQuery('#cc-label-'+key).append(' <a target="_blank" href="'+value.link+'" class="cc-learnmore-link">'+cc.strings.learnMore+'</a>');
542					}
543					if(key == "social" || key == "analytics" || key == "advertising")
544					{
545						allcustom = false;
546					}
547					jQuery('#cc-checkbox-'+key).change(function(){
548						if(jQuery(this).is(':checked'))
549						{
550							jQuery(this).parent().removeClass('cc-notification-permissions-inactive');
551						} else {
552							jQuery(this).parent().addClass('cc-notification-permissions-inactive');
553
554						}
555					});
556					if(value.defaultstate == "off")
557					{
558						jQuery('#cc-checkbox-'+key).removeAttr("checked").parent().addClass('cc-notification-permissions-inactive');
559					}
560					if(key == "necessary")
561					{
562						jQuery('#cc-checkbox-'+key).attr("disabled", "disabled");
563					}
564				}
565			});
566			jQuery('#cc-notification-wrapper h2').append(' - <a class="cc-link" href="#" id="cc-notification-moreinfo">'+cc.strings.seeDetails+'</a>');
567			if(cc.settings.consenttype == "implicit")
568			{
569				jQuery('#cc-notification-moreinfo').html(cc.strings.seeDetailsImplicit);
570			}
571			jQuery('#cc-notification-moreinfo').click(function(){
572
573				if(jQuery(this).html() == cc.strings.seeDetails || jQuery(this).html() == cc.strings.seeDetailsImplicit)
574				{
575					if(cc.settings.consenttype == 'implicit')
576					{
577						if(!cc.settings.hideallsitesbutton)
578						{
579							jQuery('#cc-approve-button-allsites').show();
580						}
581					}
582					jQuery('#cc-approve-button-thissite').html(cc.strings.savePreference);
583					jQuery('#cc-approve-button-allsites').html(cc.strings.saveForAllSites);
584					jQuery(this).html(cc.strings.hideDetails);
585				} else {
586
587					jQuery.each(cc.cookies, function(key, value) {
588						jQuery('#cc-checkbox-'+key).attr('checked', 'checked');
589					});
590
591					if(cc.settings.consenttype == 'implicit')
592					{
593						jQuery(this).html(cc.strings.seeDetailsImplicit);
594						jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookiesImplicit);
595						jQuery('#cc-approve-button-allsites').hide();
596					} else {
597						jQuery(this).html(cc.strings.seeDetails);
598						jQuery('#cc-approve-button-thissite').html(cc.strings.allowCookies);
599						jQuery('#cc-approve-button-allsites').html(cc.strings.allowForAllSites);
600					}
601
602				}
603				jQuery('#cc-notification-logo').fadeToggle();
604				jQuery('#cc-notification-permissions').slideToggle();
605				jQuery(this).blur();
606				return false;
607			});
608
609			if(!cc.ismobile)
610			{
611				if(cc.settings.bannerPosition == "cc-push")
612				{
613					//detect body margin
614					jQuery('html').animate({marginTop: bannerh}, 400);
615				}
616				jQuery('#cc-notification').slideDown();
617			} else {
618				jQuery('#cc-notification').show();
619			}
620
621			jQuery('#cc-approve-button-thissite').click(cc.onlocalconsentgiven);
622			if(cc.settings.clickAnyLinkToConsent)
623			{
624				jQuery("a").filter(':not(.cc-link)').click(cc.onlocalconsentgiven);
625			}
626			if(allcustom)
627			{
628				jQuery('#cc-notification h2 span').html(cc.strings.customCookie);
629				jQuery('#cc-approve-button-allsites').hide();
630			} else {
631				jQuery('#cc-approve-button-allsites').click(cc.onremoteconsentgiven);
632			}
633
634	},
635
636	timestamp: function()
637	{
638		return Math.round((new Date()).getTime() / 1000);
639	},
640
641	checkapproval: function()
642	{
643		cc.allasked = true;
644		jQuery.each(cc.cookies, function(key, value) {
645			if(cc.approved[key])
646			{
647				if(cc.approved[key] == "yes" || (cc.approved[key] == "always" && cc.checkedremote))
648				{
649					cc.cookies[key].asked = true;
650					cc.cookies[key].approved = true;
651					cc.execute(key);
652				} else if((cc.approved[key] == "never" && cc.checkedremote) || cc.approved[key] == "no")
653				{
654					cc.cookies[key].asked = true;
655					cc.cookies[key].approved = false;
656				} else {
657
658					cc.allasked = false;
659				}
660			} else {
661
662				cc.allasked = false;
663			}
664		});
665
666		if(!cc.allasked)
667		{
668			if(!cc.checkedlocal)
669			{
670				cc.checklocal();
671				return;
672			}
673			if(!cc.checkedremote)
674			{
675				cc.fetchprefs();
676				return;
677			}
678			if(cc.settings.consenttype == "implicit")
679			{
680				jQuery.each(cc.cookies, function(key, value) {
681					if(!cc.cookies[key].asked)
682					{
683						if(cc.settings.onlyshowbanneronce)
684						{
685							cc.setcookie('cc_'+key, 'yes', 365);
686						}
687						cc.execute(key);
688					}
689				});
690			}
691			cc.showbanner();
692		} else {
693			if(cc.settings.collectStatistics)
694			{
695				params = "";
696				params += "?s=1&n=1&" + cc.calculatestatsparams();
697				cc.insertscript(cc.settings.serveraddr+params);
698			}
699			cc.showminiconsent();
700		}
701	},
702
703	execute: function(cookieType)
704	{
705		if(cc.cookies[cookieType].executed)
706		{
707			return;
708		}
709		jQuery('.cc-placeholder-'+cookieType).remove();
710		jQuery('script.cc-onconsent-'+cookieType+'[type="text/plain"]').each(function(){
711			if(jQuery(this).attr('src'))
712			{
713				jQuery(this).after('<script type="text/javascript" src="'+jQuery(this).attr('src')+'"></script>');
714			} else {
715				jQuery(this).after('<script type="text/javascript">'+jQuery(this).html()+'</script>');
716			}
717		});
718		cc.cookies[cookieType].executed = true;
719		jQuery(document).trigger("cc_"+cookieType);
720
721		cc.executescriptinclusion(cookieType);
722
723	},
724
725	executescriptinclusion: function(cookieType)
726	{
727		timetaken = jQuery('script.cc-onconsent-inline-'+cookieType+'[type="text/plain"]').size() * cc.settings.scriptdelay;
728		now = new Date().getTime();
729
730		if(now < cc.executionblock)
731		{
732			setTimeout(cc.executescriptinclusion, cc.executionblock - now, [cookieType]);
733			return;
734		}
735		cc.executionblock = now + timetaken;
736
737		cc.insertscripts(cookieType);
738	},
739
740	insertscripts: function(cookieType)
741	{
742
743		jQuery('script.cc-onconsent-inline-'+cookieType+'[type="text/plain"]').first().each(function(){
744			cc.uniqelemid++;
745			if(jQuery(this).parents('body').size() > 0)
746			{
747				jQuery(this).after('<div id="cc-consentarea-'+cc.uniqelemid+'" class="'+cookieType+'"></div>');
748				document.write = function(g){ jQuery('#cc-consentarea-'+cc.uniqelemid).append(g); };
749				document.writeln = function(g){ jQuery('#cc-consentarea-'+cc.uniqelemid).append(g); };
750			}
751
752			if(jQuery(this).attr('src'))
753			{
754				jQuery(this).after('<script type="text/javascript" src="'+jQuery(this).attr('src')+'"></script>');
755			} else {
756				jQuery(this).after('<script type="text/javascript">'+jQuery(this).html()+'</script>');
757			}
758			jQuery(this).remove();
759
760		});
761
762		if(jQuery('script.cc-onconsent-inline-'+cookieType+'[type="text/plain"]').size() > 0)
763		{
764			setTimeout(cc.insertscripts, cc.settings.scriptdelay, [cookieType]);
765		}
766	},
767
768	getcookie: function(c_name)
769	{
770		var i,x,y,ARRcookies=document.cookie.split(";");
771		for (i=0;i<ARRcookies.length;i++)
772		{
773		  x=ARRcookies[i].substr(0,ARRcookies[i].indexOf("="));
774		  y=ARRcookies[i].substr(ARRcookies[i].indexOf("=")+1);
775		  x=x.replace(/^\s+|\s+$/g,"");
776		  if (x==c_name)
777		    {
778		    	return unescape(y);
779		    }
780	    }
781		return false;
782	},
783
784	setcookie: function (name, value, expirydays)
785	{
786		var exdate = new Date();
787		exdate.setDate(exdate.getDate() + expirydays);
788		document.cookie = name+'='+value+'; expires='+exdate.toUTCString()+'; path=/'
789	},
790
791	onremoteconsentgiven: function ()
792	{
793		if(cc.settings.clickAnyLinkToConsent)
794		{
795			jQuery("a").filter(':not(.cc-link)').unbind("click");
796		}
797		cc.allagree = true;
798		jQuery.each(cc.cookies, function(key, value) {
799			if(!value.approved && !value.asked)
800			{
801				if(jQuery('#cc-checkbox-'+key).is(':checked'))
802				{
803					if(key == "social" || key == "analytics" || key == "advertising")
804					{
805						cc.remoteCookies[key] = "always";
806						cc.approved[key] = "always";
807					} else {
808						cc.approved[key] = "yes";
809					}
810					cc.cookies[key].asked = true;
811				} else {
812					if(key == "social" || key == "analytics" || key == "advertising")
813					{
814						cc.remoteCookies[key] = "never";
815						cc.approved[key] = "never";
816					} else {
817						cc.approved[key] = "no";
818					}
819					cc.allagree = false;
820					cc.cookies[key].asked = true;
821				}
822				cc.setcookie('cc_'+key, cc.approved[key], 365);
823			} else {
824			}
825		});
826		urlx = cc.settings.serveraddr+'?p=1&tokenonly=true&cc-key='+cc.sessionkey;
827		if(cc.remoteCookies['social'])
828		{
829			urlx += '&cc-cookies-social='+cc.approved['social'];
830		}
831		if(cc.remoteCookies['analytics'])
832		{
833			urlx += '&cc-cookies-analytics='+cc.approved['analytics'];
834		}
835		if(cc.remoteCookies['advertising'])
836		{
837			urlx += '&cc-cookies-advertising='+cc.approved['advertising'];
838		}
839		cc.reloadkey = true;
840		cc.insertscript(urlx);
841
842		if(!cc.ismobile)
843		{
844			jQuery('#cc-notification').slideUp();
845			if(cc.settings.bannerPosition == "cc-push")
846			{
847				//detect body margin
848				jQuery('html').animate({marginTop: 0}, 400);
849			}
850		}
851		cc.checkapproval();
852
853		return false;
854	},
855
856	onlocalconsentgiven: function ()
857	{
858		enableall = false;
859		enablejustone = false;
860		if(jQuery(this).hasClass('cc-button-enableall') || jQuery(this).hasClass('cc-button-enable-all'))
861		{
862			enableall = true;
863			jQuery.each(cc.cookies, function(key, value) {
864				cc.cookies[key].asked = false;
865			});
866		}
867		elem = this;
868		jQuery.each(cc.cookies, function(key, value) {
869			if(jQuery(elem).hasClass('cc-button-enable-'+key))
870			{
871				enablejustone = true;
872				cc.approved[key] = "yes";
873				cc.cookies[key].asked = true;
874				cc.setcookie('cc_'+key, cc.approved[key], 365);
875			}
876		});
877
878		cc.allagree = true;
879		if(!enablejustone)
880		{
881			if(cc.settings.clickAnyLinkToConsent)
882			{
883				jQuery("a").filter(':not(.cc-link)').unbind("click");
884			}
885			jQuery.each(cc.cookies, function(key, value) {
886				if(!value.approved && !value.asked)
887				{
888					if(enableall || jQuery('#cc-checkbox-'+key).is(':checked'))
889					{
890						cc.approved[key] = "yes";
891						cc.cookies[key].asked = true;
892					} else {
893						cc.approved[key] = "no";
894						cc.cookies[key].asked = true;
895						cc.allagree = false;
896					}
897					cc.setcookie('cc_'+key, cc.approved[key], 365);
898				} else {
899				}
900			});
901		}
902		if(!cc.allagree && cc.settings.consenttype == "implicit")
903		{
904			cc.forcereload = true;
905		}
906
907		if(!cc.ismobile)
908		{
909			jQuery('#cc-notification').slideUp();
910			if(cc.settings.bannerPosition == "cc-push")
911			{
912				//detect body margin
913				jQuery('html').animate({marginTop: 0}, 400);
914			}
915		}
916		cc.checkapproval();
917		cc.reloadifnecessary();
918
919		return false;
920	},
921
922	showminiconsent: function()
923	{
924		if(jQuery('#cc-tag').length == 0)
925		{
926			data = '<div id="cc-tag" class="cc-tag-'+cc.settings.tagPosition+'"><a class="cc-link" href="#" id="cc-tag-button" title="'+cc.strings.privacySettings+'"><span>'+cc.strings.privacySettings+'</span></a></div>';
927			jQuery('body').prepend(data);
928			jQuery('#cc-tag').addClass(cc.settings.style);
929			if(!cc.settings.hideprivacysettingstab)
930			{
931				jQuery('#cc-tag').fadeIn();
932			} else {
933				jQuery('#cc-tag').hide();
934			}
935			jQuery('.cc-privacy-link').click(cc.showmodal);
936			jQuery('#cc-tag-button').click(cc.showmodal);
937		}
938	},
939
940	getsize: function(obj)
941	{
942	    var size = 0, key;
943	    for (key in obj) {
944	        if (obj.hasOwnProperty(key)) size++;
945	    }
946	    return size;
947	},
948
949	settoken: function(data)
950	{
951		if(cc.reloadkey)
952		{
953			cc.reloadkey = false;
954			if(!cc.allagree && cc.settings.consenttype == "implicit")
955			{
956				cc.forcereload = true;
957			}
958			cc.reloadifnecessary();
959		}
960		cc.sessionkey = data;
961	},
962
963	showmodal: function()
964	{
965		if(!cc.checkedremote)
966		{
967			cc.fetchprefs();
968		}
969		jQuery(document).bind('keyup', cc.onkeyup);
970		jQuery('body').prepend('<div id="cc-modal-overlay"></div>');
971		jQuery(this).blur();
972		if(cc.ismobile)
973		{
974			cc.setupformobile();
975		}
976		data = '<div id="cc-modal">' +
977				'<div id="cc-modal-wrapper">' +
978				'<h2>'+cc.strings.privacySettingsDialogTitleA+' <span>'+cc.strings.privacySettingsDialogTitleB+'</span></h2>' +
979				'<p class="cc-subtitle">'+cc.strings.privacySettingsDialogSubtitle+'</p>' +
980
981				'<div class="cc-content">' +
982				'</div>' +
983
984				'<div class="cc-clear"></div>' +
985
986				'<p id="cc-modal-closebutton" class="cc-modal-closebutton"><a class="cc-link" href="#" title="'+cc.strings.closeWindow+'"><span>'+cc.strings.closeWindow+'</span></a></p>' +
987				'<div id="cc-modal-footer-buttons">' +
988			//'<p id="cc-modal-secondclosebutton" class="cc-modal-closebutton"><a class="cc-link" href="#" title="Close window"><span>Close</span></a></p>' +
989				'<p id="cc-modal-global"><a class="cc-link" href="#" title="'+cc.strings.changeForAllSitesLink+'"><span>'+cc.strings.changeForAllSitesLink+'</span></a></p></div>' +
990			'<a id="cc-notification-logo" class="cc-logo" target="_blank" href="http://piskotki.net/kaj-so-piskotki-in-kako-delujejo/" title="'+cc.strings.poweredBy+'">Kaj so piškotki?</a> ' +
991			'<div class="cc-clear"></div>' +
992				'</div>' +
993				'</div>';
994		jQuery('body').prepend(data);
995		jQuery('#cc-modal').addClass(cc.settings.style).click(cc.closemodals);
996		if(cc.ismobile)
997		{
998			jQuery('#cc-modal').addClass("cc-mobile");
999		}
1000		cc.reloadmodal();
1001		jQuery('#cc-modal').fadeIn();
1002		jQuery('#cc-modal-overlay').fadeIn();
1003		jQuery('#cc-modal-wrapper').click(function(){
1004			cc.noclosewin = true;
1005		});
1006		jQuery('#cc-modal .cc-modal-closebutton a').click(function()
1007		{
1008			cc.showhidemodal();
1009			cc.reloadifnecessary();
1010			return false;
1011		});
1012		jQuery('#cc-modal-global').click(function()
1013		{
1014			cc.frommodal = true;
1015			cc.gotosettings();
1016			return false;
1017		});
1018		jQuery('#cc-tag-button').unbind('click').click(cc.showhidemodal);
1019		jQuery('.cc-privacy-link').unbind('click').click(cc.showhidemodal);
1020
1021		return false;
1022	},
1023
1024	closepreferencesmodal: function()
1025	{
1026		jQuery.each(cc.defaultCookies, function(key, value) {
1027			value = jQuery('#cc-globalpreference-selector-'+key).val();
1028			if(cc.approved[key] != "yes" && cc.approved[key] != "no")
1029			{
1030				cc.approved[key] = value;
1031				cc.setcookie('cc_'+key, cc.approved[key], 365);
1032			}
1033			cc.remoteCookies[key] = value;
1034
1035		});
1036		urlx = cc.settings.serveraddr+'?p=1&tokenonly=true&cc-key='+cc.sessionkey;
1037		if(cc.remoteCookies['social'])
1038		{
1039			urlx += '&cc-cookies-social='+cc.remoteCookies['social'];
1040		}
1041		if(cc.remoteCookies['analytics'])
1042		{
1043			urlx += '&cc-cookies-analytics='+cc.remoteCookies['analytics'];
1044		}
1045		if(cc.remoteCookies['advertising'])
1046		{
1047			urlx += '&cc-cookies-advertising='+cc.remoteCookies['advertising'];
1048		}
1049
1050		cc.insertscript(urlx);
1051
1052		jQuery('#cc-notification').hide().remove();
1053		jQuery(this).blur();
1054		jQuery('#cc-settingsmodal').fadeOut(null, function()
1055		{
1056			jQuery('#cc-settingsmodal').remove();
1057		});
1058		if(!cc.frommodal)
1059		{
1060			cc.checkapproval();
1061			cc.reloadifnecessary();
1062		} else {
1063			cc.frommodal = false;
1064			cc.showhidemodal();
1065		}
1066		return false;
1067	},
1068
1069	showhidemodal: function()
1070	{
1071		jQuery(this).blur();
1072		cc.checkedlocal = false;
1073		cc.checkedremote = false;
1074		if(jQuery('#cc-modal').is(":visible") && !cc.frommodal)
1075		{
1076			cc.closingmodal = true;
1077			jQuery('#cc-modal-overlay').fadeToggle(null, function(){
1078				cc.closingmodal = false;
1079			});
1080			jQuery.each(cc.cookies, function(key, value) {
1081				thisval = jQuery('#cc-preference-selector-'+key).val();
1082
1083				if(key == "necessary")
1084				{
1085					thisval = "yes";
1086				}
1087				
1088				if(thisval == "no")
1089				{
1090					cc.cookies[key].approved = false;
1091					cc.approved[key] = "no";
1092					cc.setcookie('cc_'+key, cc.approved[key], 365);
1093				} else if(thisval == "yes") {
1094					cc.cookies[key].approved = true;
1095					cc.approved[key] = "yes";
1096					cc.setcookie('cc_'+key, cc.approved[key], 365);
1097				} else {
1098					cc.cookies[key].approved = false;
1099					cc.deletecookie(key);
1100					delete cc.approved[key];
1101				}
1102				cc.cookies[key].asked = false;
1103
1104			});
1105			cc.checkapproval();
1106		} else if(!jQuery('#cc-settingsmodal').is(":visible") && !jQuery('#cc-modal').is(":visible"))
1107		{
1108			cc.closingmodal = true;
1109			jQuery('#cc-modal-overlay').fadeToggle(null, function(){
1110				cc.closingmodal = false;
1111			});
1112		}
1113		if(cc.ismobile)
1114		{
1115			jQuery('#cc-modal').toggle();
1116		} else {
1117			jQuery('#cc-modal').fadeToggle();
1118		}
1119		return false;
1120	},
1121
1122
1123	reloadmodal: function()
1124	{
1125		jQuery('#cc-modal-wrapper .cc-content').html('');
1126		if(cc.getsize(cc.cookies) > 0)
1127		{
1128			jQuery('#cc-modal-wrapper .cc-content').append('<ul></ul>');
1129			jQuery.each(cc.cookies, function(key, value) {
1130
1131				jQuery('#cc-modal-wrapper ul').append('<li id="cc-preference-element-'+key+'"><label for="cc-preference-selector-'+key+'"><strong>'+value.title+'</strong><span>'+value.description+'</span></label><select id="cc-preference-selector-'+key+'"><option value="yes">'+cc.strings.preferenceConsent+'</option><option value="no">'+cc.strings.preferenceDecline+'</option></select></li>');
1132				if(value.link)
1133				{
1134					jQuery('#cc-preference-element-'+key+' label span').append(' <a target="_blank" href="'+value.link+'" class="cc-learnmore-link">'+cc.strings.learnMore+'</a>');
1135				}
1136				if(key == "social" || key == "advertising" || key == "analytics")
1137				{
1138					jQuery('#cc-preference-selector-'+key).append('<option value="global">'+cc.strings.preferenceUseGlobal+'</option>');
1139				}
1140				jQuery('#cc-change-button-allsites').unbind('click').click(function(){
1141					cc.frommodal = true;
1142					cc.gotosettings();
1143					return false;
1144				});
1145				jQuery('#cc-preference-selector-'+key).change(function(){
1146
1147				});
1148				
1149				if(key == "necessary")
1150				{
1151					jQuery('#cc-preference-selector-'+key).remove();
1152				}
1153				if(cc.approved[key] == "yes")
1154				{
1155					jQuery('#cc-preference-selector-'+key).val("yes")
1156				}
1157				else if(cc.approved[key] == "no")
1158				{
1159					jQuery('#cc-preference-selector-'+key).val("no")
1160				}
1161				else
1162				{
1163					jQuery('#cc-preference-selector-'+key).val("global")
1164				}
1165
1166			});
1167		} else {
1168			jQuery('#cc-modal-wrapper .cc-content').append('<p>'+cc.strings.notUsingCookies+'</p>');
1169		}
1170		jQuery('.cc-content').append('<div class="cc-clear"></div>');
1171	},
1172
1173	reloadsettingsmodal: function()
1174	{
1175		jQuery('#cc-settingsmodal-wrapper .cc-content').html('');
1176		if(cc.getsize(cc.defaultCookies) > 0)
1177		{
1178			jQuery('#cc-settingsmodal-wrapper .cc-content').append('<ul></ul>');
1179			jQuery.each(cc.defaultCookies, function(key, value) {
1180
1181				jQuery('#cc-settingsmodal-wrapper ul').append('<li id="cc-globalpreference-element-'+key+'"><label for="cc-globalpreference-selector-'+key+'"><strong>'+value.title+'</strong><span>'+value.description+'</span></label><select id="cc-globalpreference-selector-'+key+'"><option value="ask">'+cc.strings.preferenceAsk+'</option><option value="always">'+cc.strings.preferenceAlways+'</option><option value="never">'+cc.strings.preferenceNever+'</option></select></li>');
1182				if(value.link)
1183				{
1184					jQuery('#cc-globalpreference-element-'+key+' label span').append(' <a target="_blank" href="'+value.link+'" class="cc-learnmore-link">'+cc.strings.learnMore+'</a>');
1185				}
1186				jQuery('#cc-globalpreference-selector-'+key).change(function(){
1187
1188				});
1189				if(cc.remoteCookies[key] == "always")
1190				{
1191					jQuery('#cc-globalpreference-selector-'+key).val("always")
1192				}
1193				else if(cc.remoteCookies[key] == "never")
1194				{
1195					jQuery('#cc-globalpreference-selector-'+key).val("never")
1196				}
1197				else
1198				{
1199					jQuery('#cc-globalpreference-selector-'+key).val("ask")
1200				}
1201
1202			});
1203		} else {
1204			jQuery('#cc-settingsmodal-wrapper .cc-content').append('<p>'+cc.strings.notUsingCookies+'</p>');
1205		}
1206		jQuery('#cc-settingsmodal-wrapper .cc-content').append('<div class="cc-clear"></div>');
1207	},
1208
1209	approvedeny: function() {
1210		key = jQuery(this).attr("id").split("-")[2];
1211		if(cc.cookies[key].approved)
1212		{
1213			cc.cookies[key].approved = false;
1214			cc.approved[key] = "no";
1215		} else {
1216			cc.cookies[key].approved = true;
1217			cc.approved[key] = "yes";
1218		}
1219		cc.setcookie('cc_'+key, cc.approved[key], 365);
1220		cc.checkapproval();
1221		cc.reloadmodal();
1222		return false;
1223	},
1224
1225	clearalllocalcookies: function() {
1226	    var cookies = document.cookie.split(";");
1227
1228	    for (var i = 0; i < cookies.length; i++) {
1229	        var cookie = cookies[i];
1230	        var eqPos = cookie.indexOf("=");
1231	        var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
1232	        document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT";
1233	    }
1234	},
1235
1236	clearlocal: function()
1237	{
1238		cc.clearalllocalcookies();
1239		jQuery(this).before('<p>'+cc.strings.clearedCookies+'</p>')
1240	},
1241
1242	getcurrenturl: function()
1243	{
1244		return window.location.protocol + "//" + window.location.host + window.location.pathname;
1245	},
1246
1247	gotosettings: function()
1248	{
1249		if(jQuery('#cc-modal').is(":visible"))
1250		{
1251			cc.showhidemodal();
1252		}
1253		jQuery(this).blur();
1254		if(cc.ismobile)
1255		{
1256			cc.setupformobile();
1257			jQuery('#cc-notification').remove();
1258		}
1259		if(cc.frommodal)
1260		{
1261			buttontext = cc.strings.backToSiteSettings;
1262		} else {
1263			buttontext = cc.strings.closeWindow;
1264		}
1265
1266		data = '<div id="cc-settingsmodal">' +
1267				'<div id="cc-settingsmodal-wrapper">' +
1268				'<h2>'+cc.strings.allSitesSettingsDialogTitleA+' <span>'+cc.strings.allSitesSettingsDialogTitleB+'</span></h2>' +
1269			'<p class="cc-subtitle">'+cc.strings.allSitesSettingsDialogSubtitle+'</p>' +
1270				'<div class="cc-content">' +
1271				'</div>' +
1272				'<div class="cc-clear"></div>' +
1273				'<p id="cc-settingsmodal-closebutton" class="cc-settingsmodal-closebutton"><a class="cc-link" href="#" title="'+buttontext+'"><span>'+buttontext+'</span></a></p>' +
1274			'<div id="cc-settingsmodal-footer-buttons">' +
1275				'<p id="cc-settingsmodal-secondclosebutton" class="cc-settingsmodal-closebutton"><a class="cc-link" href="#" title="'+buttontext+'"><span>'+buttontext+'</span></a></p>' +
1276			'</div>' +
1277				'<a id="cc-notification-logo" class="cc-logo" target="_blank" href="http://piskotki.net" title="'+cc.strings.poweredBy+'">Kaj so piškotki?</a> ' +
1278				'</div>' +
1279				'</div>';
1280		jQuery('body').prepend(data);
1281		cc.reloadsettingsmodal();
1282		jQuery('#cc-settingsmodal').addClass(cc.settings.style).click(cc.closemodals);
1283		jQuery('#cc-settingsmodal-wrapper').click(function(){
1284			cc.noclosewin = true;
1285		});
1286		if(cc.ismobile)
1287		{
1288			jQuery('#cc-settingsmodal').addClass("cc-mobile");
1289		}
1290		jQuery('#cc-settingsmodal').fadeIn();
1291		jQuery('.cc-settingsmodal-closebutton').click(cc.closepreferencesmodal);
1292
1293		return false;
1294	},
1295
1296	setupformobile: function()
1297	{
1298		if(!cc.hassetupmobile)
1299		{
1300			cc.hassetupmobile = true;
1301			jQuery('head').append('<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">');
1302			if(cc.settings.style == 'light')
1303			{
1304				bgcol = '#e1e1e1';
1305			} else {
1306				bgcol = '#1d1d1d'
1307			}
1308			jQuery('body').html('').css("margin", 0).css("backgroundColor", bgcol).css("backgroundImage", 'none');
1309		}
1310	},
1311
1312	onfirstload: function()
1313	{
1314		if(!cc.setupcomplete && cc.initobj)
1315		{
1316			if(!(window.jQuery))
1317			{
1318				cc.jqueryattempts++;
1319				if(cc.jqueryattempts >= 5)
1320				{
1321					return;
1322				}
1323				setTimeout(cc.onfirstload, 200);
1324				return;
1325			}
1326			cc.setupcomplete = true;
1327			cc.setup();
1328		}
1329		cc.checkapproval();
1330	}
1331}
1332
1333if(!(window.jQuery)) {
1334	var s = document.createElement('script');
1335	s.setAttribute('src', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js');
1336	s.setAttribute('type', 'text/javascript');
1337	document.getElementsByTagName('head')[0].appendChild(s);
1338	window.onload = cc.onfirstload;
1339} else {
1340	jQuery(document).ready(cc.onfirstload);
1341}
1342
1343/**
1344 * jQuery.browser.mobile (http://detectmobilebrowser.com/)
1345 *
1346 * jQuery.browser.mobile will be true if the browser is a mobile device - modified so that cc.ismobile is true
1347 *
1348 **/
1349(function(a){
1350	cc.ismobile=/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i.test(a)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|e\-|e\/|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|
1350sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|xda(\-|2|g)|yas\-|your|zeto|zte\-/i.test(a.substr(0,4))
1351})(navigator.userAgent||navigator.vendor||window.opera);
1352
1353
1354/**
1355 * Load web font
1356 *
1357 **/
1358
1359WebFontConfig = {
1360	google: { families: [ 'Open+Sans:400,600:&subset=latin-ext' ] }
1361};
1362(function() {
1363	var wf = document.createElement('script');
1364	wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
1365		'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
1366	wf.type = 'text/javascript';
1367	wf.async = 'true';
1368	var s = document.getElementsByTagName('script')[0];
1369	s.parentNode.insertBefore(wf, s);
1370})();

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.