//clean input placeholders
jQuery.fn.resetDefaultValue = function() {
	function _clearDefaultValue() {
		var _$ = $(this);
		if ( _$.val() == this.defaultValue ) { _$.val(''); }
	};
	function _resetDefaultValue() {
		var _$ = $(this);
		if ( _$.val() == '' ) { _$.val(this.defaultValue); }
	};
	return this.click(_clearDefaultValue).focus(_clearDefaultValue).blur(_resetDefaultValue);
}


// columns equal height
function setEqualHeight(columns) {  
	var tallestcolumn = 0;  
	columns.each(  
	function() {  
		currentHeight = $(this).height();  
		if(currentHeight > tallestcolumn) {  
			tallestcolumn  = currentHeight;  
		}  
	});  
	
	columns.height(tallestcolumn);  
}  


//initialize
$(document).ready(function(){ 

	//clean input placeholders
	$('input.clean').resetDefaultValue(); // avoid button/reset/submit buttons
	
	//media gallery hover
	$(".list-media > ul > li[class!=last]").hover(
      function () {
		$(this).next().addClass('nextEl');		
		$(this).addClass('hover');

      }, 
      function () {
		$(this).next().removeClass('nextEl');		
        $(this).removeClass('hover');
      }
    );
	
	// columns equal height
	setEqualHeight($(".box-nav-map > div"));
	
	//list boxs (fixed 20100312)
	$('.list-boxs > ul').each(function() {
		$(this).find('>li:odd').addClass('odd');;
	});

	
});

