$(function () {

    $("#sigla_ts_hover").animate({ "opacity": 0 }, 1000);

    /*********** SIGLA *************/
    $("#sigla_ts_hover").hover(
		function () {
		    $(this).stop().animate({ "opacity": 1 }, 500);
		},
		function () {
		    $(this).stop().animate({ "opacity": 0 }, 300);
		}
	);

    /*********** NEWSLETTER *************/
    $("input.newsletter_input").focus(
		function () {
		    var text = $(this).val();
		    if (text == "adresa de email") {
		        $(this).val("").css("font-style", "normal").css("background", "url('./img/icon_mail.gif') no-repeat 3px center #FFFFFF");
		    }
		    if (text == "your email address") {
		        $(this).val("").css("font-style", "normal").css("background", "url('./img/icon_mail.gif') no-repeat 3px center #FFFFFF");
		    }
		}
	);
//    $("input.newsletter_input").blur(
//		function () {
//		    var text = $(this).val();
//		    if (text == "") {
//		        $(this).val("adresa de email").css("font-style", "italic").css("background", "url('./img/icon_mail.gif') no-repeat 3px center #FFFFFF");
//		    }
//		}
//	);

    /*********** MENIU ***********/
    $("#menu_links_wrapper a").hover(
		function () {
		    if ($(this).attr("class") != "selected") {
		        $(this).stop(false, false).animate({ height: "29px", marginTop: "-6px", lineHeight: "29px", backgroundPosition: "(0px 29px)" }, 200);
		    }
		},
		function () {
		    if ($(this).attr("class") != "selected") {
		        $(this).stop(false, false).animate({ height: "21px", marginTop: "1px", lineHeight: "21px", backgroundPosition: "(0 top)" }, 200);
		    }
		}
	);

    /*********** CARTIER REZIDENTIAL ******** 
    $("#cartier_rezidential").hover(
		function () {
		    $(this).find(".cartier_rezidential_top_text3").stop().animate({ bottom: "0px" }, 200);
		},
		function () {
		    $(this).find(".cartier_rezidential_top_text3").stop().animate({ bottom: "-21px" }, 100);
		}
	);

    /********* HOME CARTIER REZIDENTIAL SLIDER 
    function doSliderCartierRezidential() {
        $("#imagini_slider_cartier_rezidential img:first")
		.stop(true, true)
		.css("position", "absolute")
		.css("display", "none")
		.appendTo("#car_rez_slider")
		.fadeIn(500, function () {
		    img = $(this).clone();
		    img.appendTo("#imagini_slider_cartier_rezidential");
		    $("#car_rez_slider img:first").stop(true, true).fadeOut(5000, function () {
		        $(this).remove();
		        doSliderCartierRezidential();
		    });
		});
    }
    $("#imagini_slider_cartier_rezidential").fadeOut(0).delay(5000).fadeOut(0, function () {
        doSliderCartierRezidential();
    });
    **********/
});


