// Linkovi prema van
$(function(){
  $("a[rel*='van']").click(function(){
   this.target = "_blank";
  });
});

$(function() {

    var numCols = $("colgroup").length;
	
    $("tr:odd").addClass("odd");
    $("tr:last").addClass("zadnji-red");
    
    $("td, th").each(function(i) {
        $(this).addClass("kolumna");
    });
        
});

//Funkcija za scroll na vrh
$(function(){
	$.fn.scrollToTop=function() {
		$(this).hide().removeAttr("href");
		if($(window).scrollTop()!="0") {
			$(this).fadeIn("slow") 
			}
			
			var scrollDiv=$(this);
			
			$(window).scroll(function() {
				if($(window).scrollTop()=="0") { 
					$(scrollDiv).fadeOut("slow") 
					}
				else {
					$(scrollDiv).fadeIn("slow") 
					}
				});
			
			$(this).click(function() {
				$("html, body").animate({scrollTop:0},"slow")
				})
			}
			});

  $(function() { 
			 $("#vrh").scrollToTop(); 
  });

$(document).ready( 

  function(){ 
	$('#korisnici-onama').innerfade({ 
	  animationtype: 'fade', 
	  speed: 600, 
	  timeout: 15000, 
	  type: 'sequence', 
	  containerheight: '130px'
	}); 
	
	
//Test serveri informacije
$('.informacije').hide();
$('a.sklopka').click(function() {
$('.informacije').hide();
$(this).parent().parent().next('.informacije').slideToggle(200);
return false;
   });

//Login panel
$('div#panel-sadrzaj').hide();
$("div.panel_button").click(function(){
		$("div#panel-sadrzaj").animate({
			height: "210px"
		})
		.animate({
			height: "200px"
		}, "fast");
		$("div.panel_button").toggle();
});	
	
$("div#hide_button").click(function(){
		$("div#panel-sadrzaj").animate({
			height: "0px"
		}, "fast");		
	
});
  
  
  
});
  
  