$(function() {
		
		  	
	$("#frontpage_tabs").tabs("#frontpage_slides > div", {
	
		// enable "cross-fading" effect
		effect: 'fade',
		fadeInSpeed: 300,
		fadeOutSpeed: 300, 
		
	
		// start from the beginning after the last tab
		rotate: true
	
	// use the slideshow plugin. It accepts its own configuration
	}).slideshow({autoplay: true, interval: 5000});
	
	$("ul.multimedija_tabs").tabs("div.multimedija_panes > div");
	
	// SPONZORJI DOCK MENU
	

	  // set up the options to be used for jqDock...
  //var dockOptions =
//    { align: 'middle' // horizontal menu, with expansion UP/DOWN from the middle
//	, size: 46 
//    };
//  // ...and apply...
//  $('#menu').jqDock(dockOptions);
	
	
	//PAGE LIST
	//$('.page_list').hoverAccordion({
//		active: 'current_page_item',
//		keepheight: false,
//		speed: 'fast'
//	});
//	
//	//LEFT MENU ACC
//	$('.left_menu').hoverAccordion({
//		active: 'current_page_item',
//		keepheight: false,
//		speed: 'fast'
//	});
//	
//	$('.children').hoverAccordion({
//		active: 'current_page_item',
//		keepheight: false,
//		speed: 'fast'
//	});

		
	//		$(".left_menu").treeview({
//				collapsed: true,
//				animated: "medium",
//				//control:"#sidetreecontrol",
//				persist: "location"
//			});
//			
//			$(".page_list").treeview({
//				collapsed: true,
//				animated: "medium",
//				//control:"#sidetreecontrol",
//				persist: "location"
//			});
//		
	
	// MAIN MENU
    $("#main_menu ul li").hover(function(){
    
        $(this).addClass("hover");
        $('ul:first',this).css('visibility', 'visible');
    
    }, function(){
    
        $(this).removeClass("hover");
        $('ul:first',this).css('visibility', 'hidden');
    
    });
    
    $("#main_menu ul li ul li:has(ul)").find("a:first").append(" &raquo; ");
	
	$("#frontpage_slides_box").equalHeights();
	$("#footer-row-2").equalHeights();

	// IE Z-INDEX fix	
	var zIndexNumber = 1000;
	$('div').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber = 10;
	});
	
	var zIndexNumber = 1000;
	$('#header').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber = 20;
	});
	
	var zIndexNumber = 1000;
	$('.page_item-povezave ul').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber = 30;
	});
	
	var zIndexNumber = 1000;
	$('#depthchart').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber = 20;
	});
	
	var zIndexNumber = 1000;
	$('.tooltip').each(function() {
		$(this).css('zIndex', zIndexNumber);
		zIndexNumber = 30;
	});

	
});
