jQuery(document).ready(function() {
	slideShow();
	overMenu();
	var highestCol = Math.max(jQuery('.b-content').height(),jQuery('.sidebar').height());
	jQuery('.col').height(highestCol);
});

var tC;

function slideShow() {
	jQuery('#slideshow').cycle({ 
		fx:    'fade',
		timeout: 2500,
		delay: 2000,
		speed:  100 
	});
}

var currentMenu;
var opened;
var timerMenu;

function overMenu() {
	var menus = jQuery('#navbar .menu-item-object-category');

	menus.mouseenter(function(){
		currentMenu = jQuery(this).children('.nav-child');
		clearTimeout(timerMenu);
		if (opened && currentMenu != opened) opened.fadeOut(100);
		currentMenu.fadeIn(150, function(){
			opened = currentMenu;
			opened.mouseleave(function(){
				opened.fadeOut(100);
			});
		});
	}).mouseleave(function(){
		timerMenu = setTimeout(hideOpened , 200);
	});
}

function hideOpened(){
	if(opened) opened.fadeOut(100);
}