

// MAIN MENU Container

$(document).ready(function() {
						
						   
$("#toggleWrap").css("height",0);

$("#controlbutton").mouseover( function(){
				   
	$("#toggle").animate({ marginTop: "0px" }, 480 );
	$("#openCloseToggle").css("display","none");
	$("#controlbutton").hide();
});

$("#toggleWrap").mouseout(function(){
	$().mousemove( function(e) {
		if (e.pageY > 110) {
		if($("#openCloseToggle").css("display") == "none"){
			$("#toggle").animate({ marginTop: "-110px" }, 480 );
			$("#openCloseToggle").css("display","block");
			$("#controlbutton").fadeIn("slow");
		}
	}
	});
	
$("ul.menu li:nth-child(5)").addClass("glow");
$("ul.menu li:last a").css("padding-right", "0px");
	
});

// MAIN MENU function

var site = function() {
	this.menuLi = $('.menu li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 	
 		this.menuLi.hover(function() {
 			// mouseover
			$(this).find('> ul').stop(true, true).fadeIn( 600, 'linear');
 		}, function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).fadeOut( 400, 'linear'); 		
		});
				
 	}
 
}

new site();

// TEAM MENU function

var site = function() {
	this.teamLi = $('#teams ul li').children('ul').hide().end();
	this.init();
};

site.prototype = {
 	
 	init : function() {
 		this.setMenu();
 	},
 	
 	// Enables the slidedown menu, and adds support for IE6
 	
 	setMenu : function() {
 
 	
 		this.teamLi.hover(function() {
 			// mouseover
			$(this).find('> ul').stop(true, true).fadeIn( 600, 'linear');
 		}, function() {
 			// mouseout
 			$(this).find('> ul').stop(true, true).fadeOut( 400, 'linear'); 		
		});
 		
 	}
 
}

new site();

    $(".list-item").hoverIntent({over: function() {
        $(this).animate({marginTop: "4px"}, 350 );
    }, timeout: 500, out: function() {
		$(this).animate({marginTop: "0px"}, 350 ); 
	}});
  
// POST function 

$(".news li:odd").addClass("odd");
$(".tabulka tr:even td").css("backgroundColor", "#fff");
$(".tabulka tr.home td").css("backgroundColor", "#fffecf");

// SIDEBAR function 

$("#sidebar li.widget:nth-child(2)").addClass("second");
});

// Soupiska function

jQuery(document).ready(function(){
		jQuery('.soupiska_content').slideUp();
		
		jQuery('.soupiska h4').click(function(){		
			if(jQuery(this).parent().next('.soupiska_content').css('display')=='none')
				{	jQuery(this).removeClass('inactive');
					jQuery(this).addClass('active');
					jQuery(this).children('img').removeClass('inactive');
					jQuery(this).children('img').addClass('active');
					
				}
			else
				{	jQuery(this).removeClass('active');
					jQuery(this).addClass('inactive');		
					jQuery(this).children('img').removeClass('active');			
					jQuery(this).children('img').addClass('inactive');
				}
				
			jQuery(this).parent().next('.soupiska_content').slideToggle('slow');	
		});
});
