(function($) {
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) {
				tallest = $(this).height();
			}
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			$(this).height(tallest).css("overflow","auto");
		});
	}
})(jQuery);

$(document).ready(function() {
       // hides the slickbox as soon as the DOM is ready
       // (a little sooner than page load)
        $('#proyectoDropDown').hide();
		$('#bibliotecaDropDown').hide();
		$('#loginBox').hide();
       // shows the slickbox on clicking the noted link  
        $('a#proyectoLink').click(function() {
          $('#proyectoDropDown').fadeIn('slow');
		  $('#bibliotecaDropDown').fadeOut('fast');
          return false;
        });
        $('a#bibliotecaLink').click(function() {
          $('#bibliotecaDropDown').fadeIn('slow');
		  $('#proyectoDropDown').fadeOut('fast');
          return false;
        });
       // hides the slickbox on clicking the noted link  
        $('a#proyectoDropDownClose').click(function() {
          $('#proyectoDropDown').fadeOut('fast');
          return false;
        });
        $('a#bibliotecaDropDownClose').click(function() {
          $('#bibliotecaDropDown').fadeOut('fast');
          return false;
        });
		
		 $('a#loginLink').click(function() {
          $('#loginBox').fadeIn('slow');
          return false;
        });
		
		$('a#logOut').click(function() {
          $('#loginBox').fadeOut('slow');
          return false;
        });
		
		$('a[rel*=facebox]').facebox();
});

