// producatori
function show(){
		jQuery('#submenu').show();
}
var t;
function hide(id){
	t = 1;
	setTimeout('hhide()',100);
}

function hhide(id){
	if(t==1){
		jQuery('#submenu').hide();
	}
}

function sshow(){
	t=0;
}

// abonare newsletter
function abonare(){

	var email = jQuery('#mail').val();
	jQuery.post('ajax.php?action=abonare',
		{
			email: email
		},
		function(data){
			jQuery('#abonare').fadeOut('slow',function(){
				eval(data);
				jQuery('#abonare').fadeIn('slow',function(){
					setTimeout('restore_abonare()',2000);
				});
			});
		}
	);

}

function restore_abonare() {
	jQuery('#abonare').fadeOut('slow',function()
		{
			jQuery('#abonare').html('<form action=\"javascript:abonare();\" method=\"post\"><input type=\"text\" value=\"Adresa email:\" onfocus=\"if( this.value==\'Adresa email:\' ) this.value=\'\';\" onblur=\"if( this.value==\'\' ) this.value=\'Adresa email:\';\" class=\"input_small\" id=\"mail\" name=\"mail\"/><input name=\"submit\" class=\"button\" type=\"submit\" value=\"\" /></form>');
			jQuery('#abonare').fadeIn('slow');
		}
	);
}

$(function(){
	jQuery('.date-tehnice p strong a').click(function(){
		var parinte = jQuery(this).parent();
		var bunic = jQuery(parinte).parent();
		jQuery('span.toggle', bunic).toggle();
		return false;
	});
});

