jQuery.fn.slideFadeToggle = function(speed, easing, callback) {
return this.animate({opacity: 'toggle', height: 'toggle'}, speed, easing, callback);
};

$(document).ready(function() {
 // $('div.menu> ul').hide();
 // $('div.menu ul:first').show();
  $('div.menu> h2,div.stat>h2').click(function() {
 var $nextDiv = $(this).next();
 var $visibleSiblings = $nextDiv.siblings('ul:visible');
 if ($visibleSiblings.length ) {
   $visibleSiblings.slideUp('fast', function() {
  $nextDiv.slideToggle('fast');
   });
 } else {
    $nextDiv.slideToggle('fast');
 }
  });
}
);

$(document).ready(function() {
//Set the even row to different color  
//$('ul#menu li:even').addClass('even');  
//configure the animations

//var betaDiv = document.createElement("div");
//betaDiv.id = "beta";
//document.body.appendChild(betaDiv);

$('div.menu ul li a').mouseover(function() {  
$(this).animate( { paddingLeft:"5px" }, { queue:false, duration:300 } );  
}).mouseout(function() {
$(this).animate( { paddingLeft:"0" }, { queue:true, duration:300 } )
}).click(function() {
$(this).parent().animate( { opacity: 'toggle', duration:300} ).animate( { height: 'toggle', duration:300 }, { queue:false, duration:300 } )
});
});
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}
function noviPr(url) {
    createCookie('login','login',1);
    browselink=window.open(url,"klub",'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=800, height=600');
    //"width=400,height=200,toolbar=yes,location=yes,directories=yes,statusbar=no,scrollbars=yes,copyhistory=yes,resizable=yes");
    window.open(url,"klub");
}
function privatc(URL,PUSER) {
    day = new Date();
    id = escape(PUSER);
    eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=680,height=530,left=212,top=134');");
}
//<a class="user" href="javascript:privChat(\'private.php?u=' + theUser + '\',\'' + theUser + '\')">Privatni Chat</a></div>'
function razgovor(ko,koga) {
    createCookie('login','login',1);
    window.open('/chat/private.php?u='+ko+'&m='+koga,"razgovor",'toolbar=0, location=0, directories=0, status=0, menubar=0, scrollbars=0, resizable=0, width=680, height=530');
}
