$(function () {
    $("a[rel^='prettyPhoto']").prettyPhoto();
    $("#slideshow").cycle({
        fx: "fade"
    });
    $('a[href^="#"]').click(function () {
        var a = $(this).attr("href");
        $("html, body").animate({
            scrollTop: $(a).offset().top
        }, "slow");
        return !1
    });
    0 == $(".ongletHotel").length && $("#main-menu ul.subMenu:eq(0)").hide();
    0 == $(".ongletRoom").length && $("#main-menu ul.subMenu:eq(1)").hide();
    $("#main-menu li.toggleSubMenuHotel > a").click(function () {
        if (0 < $(".ongletHotel").length) return 0 != $(this).next("ul.subMenu:visible").length ? $(this).next("ul.subMenu").slideUp("normal") : ($("#main-menu ul.subMenu").slideUp("normal"), $(this).next("ul.subMenu").slideDown("normal")), !1
    });
    $("#main-menu li.toggleSubMenu > a").click(function () {
        0 != $(this).next("ul.subMenu:visible").length ? $(this).next("ul.subMenu").slideUp("normal") : ($("#main-menu ul.subMenu").slideUp("normal"), $(this).next("ul.subMenu").slideDown("normal"));
        return !1
    });
    $("#arrival, #departure").datepicker({
        minDate: new Date,
        onSelect: function () {
            if ("" != $("#arrival").val() && "" != $("#departure").val()) {
                var a = $("#arrival").datepicker("getDate"),
                    b = $("#departure").datepicker("getDate"),
                    c = a.getTime(),
                    b = b.getTime(),
                    c = Math.abs(c - b) / 864E5;
				$("#gg").val(a.getDate());
				$("#mm").val(a.getMonth() + 1);
				$("#aa").val(a.getFullYear());
                $("#notti_1").val(c)
            }
        }
    });
    $(window).load(function () {
        var a = new google.maps.LatLng(48.862809, 2.338243),
            b = {
                zoom: 13,
                center: a,
                mapTypeId: google.maps.MapTypeId.ROADMAP
            },
            b = new google.maps.Map(document.getElementById("map"), b);
        new google.maps.Marker({
            position: a,
            map: b,
            title: "Hotel Louvre Bons Enfants Paris"
        })
    })
});
