$(document).ready(function () {

    $('.SubNode > li').click(function (e) {
        if ($.browser.msie) {
            window.event.cancelBubble = true;
        }
        if (e.stopPropagation) {
            e.stopPropagation();
        }
    });

    $('.MainNode > li').click(function (e) {
        var isOpen = $(this).find('.SubNode').is(':visible');
        $('.SubNode').slideUp('fast');
        if (!isOpen) $(this).find('.SubNode').slideDown('fast');
    });
    var $contentGoodies = $('#contentGoodies');
    $('#MainMenuHome .infos').click(function () {
        if (!$(this).is(':animated')) {
            var right = $contentGoodies.css('right') == '0px' ? '-31px' : '0px';
            $contentGoodies.animate({ right: right }, 'slow');
        }
    });
    var $BackImage = $("#BackImage");
    $(".icoPhoto").click(function (e) {
        e.preventDefault();
        idxBack++;
        if (idxBack >= nbBack) idxBack = 0;
        $BackImage.css("background-image", "url('" + backImages[idxBack] + "')")
    });
});
