function formatText(index, panel) {
		  return index + "";
}

//function portfeljShow(curN,maxN) {
//	for(i=1; i<=maxN; i++) {
//		if(i==curN) { 
//			document.getElementById('portfelj'+i).style.display="block";
//		}
//		else { 
//			document.getElementById('portfelj'+i).style.display="none";
//		}
		//alert(document.getElementById('portfelj'+i).style.display);
//	}
//}


$(function () {
	
            $('.anythingSlider').anythingSlider({
                easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
                autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
                animationTime: 600,             // How long the slide transition takes
                hashTags: true,                 // Should links change the hashtag in the URL?
                buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
        		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
            });
            
            function gotoSlajd () {
            	var index = $(this).attr('href').replace('#','');
            	$('.anythingSlider').gotoPage(index);
                e.preventDefault();
            }
            
            var sconfig = {    
        			 sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)    
        			 interval: 500, // number = milliseconds for onMouseOver polling interval    
        			 over: gotoSlajd, // function = onMouseOver callback (REQUIRED)    
        			 timeout: 500, // number = milliseconds delay before onMouseOut    
        			 out: gotoSlajd // function = onMouseOut callback (REQUIRED)    
        	};
            
            //$(".anyLink").hoverIntent(sconfig);
            
            
            
            $(".anyLink").click(function(e){
            	var index = $(this).attr('href').replace('#','');
            	$('.anythingSlider').gotoPage(index);
                e.preventDefault();
                
            });
            $(".anyLink2").click(function(e){
            	
            	var index = $(this).attr('href').replace('#','');
            	$('.anythingSlider').gotoPage(index);
            	$("a.anyLink2").css("color", "#908892");
            	$(this).css("color", "#9f3cb6");
                e.preventDefault();
                
            });
            
            $(".sre_meni, #homeVEP").hover(function(e){
            	$('.anythingSlider').startStop(false);
            },function(e){
            	$('.anythingSlider').startStop(true);
            });
            
            $("#portfeljSwitch a").click(function(e){
            	$('#portfelj_vsebina table').css("display","none");
            	var index = $(this).attr('href').replace('#','');
            	$('#portfelj_vsebina table#portfelj' + index).fadeIn("normal").show();
            	e.preventDefault();
            });

            
});

