
$(document).ready(function(){
// hover pe butoane mari
  $("#lnk_albume").mouseover(function () {
   $('#lnk_albume').fadeTo('fast', 0.8);
  });
   $("#lnk_albume").mouseout(function () {
   $('#lnk_albume').fadeTo('fast', 1);
  });
  
  $("#lnk_invitatii").mouseover(function () {
   $('#lnk_invitatii').fadeTo('fast', 0.8);
  });
   $("#lnk_invitatii").mouseout(function () {
   $('#lnk_invitatii').fadeTo('fast', 1);
  });
  
   $("#lnk_cadouri").mouseover(function () {
   $('#lnk_cadouri').fadeTo('fast', 0.8);
  });
   $("#lnk_cadouri").mouseout(function () {
   $('#lnk_cadouri').fadeTo('fast', 1);
  });
});

// caseta top mesaj
$(document).ready(function() {
   $('.msg_close').click(function(){
     $('div.showhide,.msg').animate({ opacity: 'hide' }, 'fast');
   });
   
// caseta cautare avansata
    $('.search_close').click(function(){
     $('div.showhide,.search_adv_box').animate({ opacity: 'hide' }, 'fast');
   });
   $('#search_adv').click(function(){
     $('div.showhide,.search_adv_box').animate({ opacity: 'show' }, 'fast');
   });
// avatarele default
   $('.lnk_default_avatars').click(function(){
     $('div.showhide,.default_avatars').animate({ height: 'toggle', opacity: 'toggle' }, 'fast');
   });
// selecteaza tip cont
   $(".cont_type").click(function(){if($(this).val()==="mireasa") $(".inregistrare_mireasa").show("fast"); else $(".inregistrare_mireasa").hide("fast");});
   
   $(".cont_type").click(function(){if($(this).val()==="furnizor") $(".inregistrare_furnizor").show("fast"); else $(".inregistrare_furnizor").hide("fast");});
 
// Reset filtru furnizor
 
$('.filter_reset').click(function(){
	document.getElementById("judet").selectedIndex = 
	document.getElementById("judet").getAttribute("default");
	document.getElementById("oras").selectedIndex = 
	document.getElementById("oras").getAttribute("default");
 });


});

// focus la inputuri

$(document).ready(function(){
	
	$('.login_minibox').corner({ tl: { radius: 6 }, tr: { radius: 6 }, bl: { radius: 0 }, br: { radius: 0 }, antiAlias: true,  autoPad: true, });
    $('.search_minibox').corner({ tl: { radius: 6 }, tr: { radius: 6 }, bl: { radius: 0 }, br: { radius: 0 }, antiAlias: true,  autoPad: true, });
	
	var inputBoxes = $("input");
	var utilizatorBox = $("#utilizator");
	var utilizatorBoxDefault = "Utilizator";
//	var parolaBox = $("#parola");
//	var parolaBoxDefault = "Parola";
	var nlBox = $("#newsletter");
	var nlBoxDefault = "adresa de e-mail";
	
	
	inputBoxes.focus(function(e){
		$(this).addClass("active");
	});
	inputBoxes.blur(function(e){
		$(this).removeClass("active");
	});
	
	
	utilizatorBox.focus(function(){
		if($(this).attr("value") == utilizatorBoxDefault) $(this).attr("value", "");
	});
	utilizatorBox.blur(function(){
		if($(this).attr("value") == "") $(this).attr("value", utilizatorBoxDefault);
	});
//	parolaBox.focus(function(){
//		if($(this).attr("type") == "text") {
//			$(this).attr("value", "");
//			document.getElementById('parola').type = "password";
//		}
//	});
//	parolaBox.blur(function(){
//		if($(this).attr("value") == "") {
//			$(this).attr("value", parolaBoxDefault);
//			document.getElementById('parola').type = "text";
//		}
//	});
	nlBox.focus(function(){
		if($(this).attr("value") == nlBoxDefault) $(this).attr("value", "");
	});
	nlBox.blur(function(){
		if($(this).attr("value") == "") $(this).attr("value", nlBoxDefault);
	});
});
