$(document).ready(function () {
	
	/**
	 * Shadowbox
	 */
	
	Shadowbox.init();
	
	/**
	 * Submenu behaviour
	 */
	
	$('.sub').each(function() {
	
		var init_height = $(this).height();
	
		$(this).find('.subsub').css('display', 'none');
	
		$(this).mouseenter(function () {
			
			$(this).find('.subsub').css('display', 'block');
			//$(this).find('.link').addClass('active');
			
			var height = $(this).find('.subsub').outerHeight();
			
			$(this).css('height', parseInt(init_height) + parseInt(height) + 30);
		});
		
		
		$(this).mouseleave(function () {
			$(this).find('.subsub').css('display', 'none');
			//$(this).find('.link').removeClass('active');
			$(this).css('height', init_height);
		});
		
	});
});	

