/* ================================================================ 
This copyright notice must be untouched at all times.
Copyright (c) 2008 Stu Nicholls - stunicholls.com - all rights reserved.
=================================================================== */

$(document).ready(function(){
	if($("#nav")) {
		/* $("#nav dd").hide();*/
		$("#nav dt b").click(function() {
			if(this.className.indexOf("clicked") != -1) {
				$(this).parent().next().slideUp(200);
				$(this).removeClass("clicked");
			}
			else {
				$("#nav dt b").removeClass();
				$(this).addClass("clicked");
				$("#nav dd:visible").slideUp(200);
				$(this).parent().next().slideDown(500);
			}
			return false;
		});
	}
});

jQuery(document).ready(function(){
   $('.head').click(function() {
		$(this).next().slideToggle('slow');
		$(this).toggleClass("titActivo2");
		  return false;
 	}).next().hide();
});


/** 
 * @projectDescription	Simple Equal Columns
 * @author 	Matt Hobbs
 * @version 	0.01 
 */
jQuery.fn.equalCols = function(){
	//Array Sorter
	var sortNumber = function(a,b){return b - a;};
	var heights = [];
	//Push each height into an array
	$(this).each(function(){
		heights.push($(this).height());
	});
	heights.sort(sortNumber);
	var maxHeight = heights[0];
	return this.each(function(){
		//Set each column to the max height
		$(this).css({'height': maxHeight});
	});
};
//Usage
jQuery(function($){
	//Select the columns that need to be equal e.g
	$('div.column').equalCols();
	$('#col_01,#col_02,#col_03,#col_04,#col_05,#col_06,#col_07').equalCols();
});
