﻿$(function() {
	
		
    // removes IE anchor focus borders
    $('a').focus(
		function () {
		    $(this).attr("hideFocus", "hidefocus");
		});

    // turns off jQuery AJAX caching	
    $.ajaxSetup({ cache: false });
    
    //Set drop menu
	initializeMenu();
	
	try
	{
		//Set accordion
		myMenu = new SDMenu("my_menu");
		myMenu.init();
	}
	catch(e){}


	//activate shadows
	//activateShadows('shdw');

	//activate tooltips
	//alert($('#tp1').length);
	
	if ($('#tp1').length > 0)
	{
		$('#tp1').bubbletip($('#tip1'), {
	    deltaDirection: 'left',
	    deltaPosition: 10,
	    offsetTop: 10,
	    offsetLeft: 0
			});
	}
	
	if ($('#tp2').length > 0)
	{
		$('#tp2').bubbletip($('#tip2'), {
	    deltaDirection: 'left',
	    deltaPosition: 10,
	    offsetTop: -20,
	    offsetLeft: 0
			});
	}

	//Set image slider
	initializeRotator();

	//Set NewsSlider
	if ($(".siNewsTicker").length > 0)
	{
		initializeSlider();
	}

	//z-index stacking fix
	var zIndexNumber = 10000;
	$('div div:not(.skipZ)').each(function()  //skipZ class is used to denote div which shouldn't be considered
	{
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber -= 1;
	});

    var d = new Date();
	var curYear = d.getFullYear();
	$("#copyrightYear").html(curYear);
})

$(function() {
		
		/*$(".s4-search .ms-sbrow .ms-sbcell input.ms-sbplain").attr("value", "Išči");
		$(".s4-search .ms-sbrow .ms-sbcell input.ms-sbplain").focusout(function() {
			if ($(this).attr("value") == '')
			{
				$(this).attr("value", "Išči");
				$(this).css("font-style", "italic");
			}
		}).blur(function() {
			if ($(this).attr("value") == '')
			{
				$(this).attr("value", "Išči");
				$(this).css("font-style", "italic");
			}
		});
		
		/*$("#aspnetForm").click(function() {
			if ($(this).attr("value") == '')
			{
				$(this).attr("value", "Išči");
				$(this).css("font-style", "italic");
			}
			
		});*/
		
		
		/*$(".s4-search .ms-sbrow .ms-sbcell input.ms-sbplain").focusin(function() {
			if ($(this).attr("value") == 'Išči')
			{
				$(this).attr("value", "");
				$(this).css("font-style", "normal");
			}
		});*/
		
		});
$(function() {
	var d = new Date();
	var curYear = d.getFullYear();
	$("#copyrightYear").html(curYear);
});	

$(function(){

var divic = $("#cbqwpctl00_ctl36_g_8b39ca73_2760_482b_868f_1f7c3f392dc5"); 
	if(divic == null || divic.children()==null || divic.children().length == 0)
	{
		divic.html("<div style=\"margin-bottom:50px;\"><h2 style=\"border:0;\">Trenutno ni aktuelnih dogodkov</h2>");
	}
	
});

$(document).ready(function(){
        $('*[className^="ms-sitemapdirectional"]:contains("Home")').text("Domov");
});

window.onload = function() {
};

window.onscroll = function() {
};


window.onresize = function() {
};







