/* 
#	09-10-2008
#	Federico Baccaro
#	info@federicobaccaro.com.ar
*/


/* TOGGLE */
$(document).ready(function() {

	$(".togglegroup:eq(0) > .toggle").click(function() {

		$(this).next(".toggledesc").slideToggle("normal");
		$(this).children("#boton").toggle();

	});

	$(".toggledesc").hide();
	$(".toggle:eq(0)").trigger("click");

});


/* FIELD DEFAULTS */
jQuery.formDefaultsValues = function(){

	$('input:text,textarea').each( function(){
		
        var t = $(this);
		var value = t.attr('value');
		var title = t.attr('title');
		
		if ( title.length > 0 && ( title == value || value.length < 1 ) ) {

			t.val(title);
			
			t.focus( function(){
	
				if ( t.val() == title ) { 
					t.val(''); }
			});
	
			t.blur( function(){
				
				if ( t.val().length < 1 ) { 
					t.val(title); }
			});
			
		} //if

	});
	
}

$(document).ready(function(){

	$.formDefaultsValues();
	
});

