
function displayHotel()
{    
    clearClick = false;
    if (isIE)
    {
        initHotelList();
        RPMenu();
        clearClick = true;
    }
    else
    {
        $('#menu-top').stop(true, true).animate({'opacity':'0'}, 0);
        $('#menu-list').stop(true, true).animate({'opacity':'0'}, 0, function()
        {
            initHotelList();
            RPMenu();
            $('#menu-top').stop(true, true).animate({'opacity':'1'}, 800);
            $('#menu-list').stop(true, true).animate({'opacity':'1'}, 800, function(){clearClick = true;});
        });
    }
}

function initHotelList()
{
    $('#menu-list').css('margin-top', 0);
    var HTML2 = '<ul><li><a href="javascript:void(0)" id="back-menu">'+BACK_MENU+'</a></li>';
    HTML2 += '<li style="height:10px;"></li>';
    HTML2 += '<li><a href="javascript:void(0)" id="presentation">'+PRESENTATION+'</a></li>';
    HTML2 += '<li><a href="javascript:void(0)" id="bungalow">'+BUNGALOW+'</a></li>';
    HTML2 += '<li><a href="javascript:void(0)" id="history">'+HISTORY+'</a></li>';
    HTML2 += '<li><a href="javascript:void(0)" id="spa">'+SPA+'</a></li>';
    HTML2 += '<li style="display:none;"><a href="javascript:void(0)" id="beauty_office">'+BEAUTY_OFFICE+'</a></li>';
    HTML2 += '<li><a href="javascript:void(0)" id="eat-drink">'+EAT_DRINK+'</a></li></ul>';
    var HTML = '<li style="height:280px;">';
    HTML += '<span class="map-holder" id="map-lobby-bar"></span>';
    HTML += '<span class="map-holder" id="map-solarium"></span>';
    HTML += '<span class="map-holder" id="map-i"></span>';
    HTML += '<span class="map-holder" id="map-ii"></span>';
    HTML += '<span class="map-holder" id="map-iii"></span>';
    HTML += '<span class="map-holder" id="map-iv"></span>';
    HTML += '<span class="map-holder" id="map-v"></span>';
    HTML += '<span class="map-holder" id="map-vi"></span>';
    HTML += '<span class="map-holder" id="map-vii"></span>';
    HTML += '<span class="map-holder" id="map-viii"></span>';
    HTML += '<span class="map-holder" id="map-ix"></span>';
    HTML += '<span class="map-holder" id="map"></span>';
    HTML += '</li>';
    HTML += '<li><a href="javascript:void(0)" id="lobby"><span class="menu-tab">&nbsp;</span><span class="small-menu">'+LOBBY+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="bar"><span class="menu-tab">&nbsp;</span><span class="small-menu">'+BAR+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="solarium"><span class="menu-tab">&nbsp;</span><span class="small-menu">'+SOLARIUM+'</span></a></li>';
    HTML += '<li style="height:10px;"></li>';
    HTML += '<li><a href="javascript:void(0)" id="i-serge"><span class="menu-tab">I</span><span class="small-menu">'+I_SERGE+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="ii-jean"><span class="menu-tab">II</span><span class="small-menu">'+II_JEAN+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="iii-charlotte"><span class="menu-tab">III</span><span class="small-menu">'+III_CHARLOTTE+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="iv-fernand"><span class="menu-tab">IV</span><span class="small-menu">'+IV_FERNAND+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="v-georges"><span class="menu-tab">V</span><span class="small-menu">'+V_GEORGES+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="vi-juliette"><span class="menu-tab">VI</span><span class="small-menu">'+VI_JULIETTE+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="vii-pierre"><span class="menu-tab">VII</span><span class="small-menu">'+VII_PIERRE+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="viii-alexandre"><span class="menu-tab">VIII</span><span class="small-menu">'+VIII_ALEXANDRE+'</span></a></li>';
    HTML += '<li><a href="javascript:void(0)" id="ix-mathieu"><span class="menu-tab">IX</span><span class="small-menu">'+IX_MATHIEU+'</span></a></li>';

    $('#menu-top').html(HTML2);
    $('#menu-list-content').html(HTML);
    $('#menu-top').css('margin-top', $('#menu-logo').height()- $('#menu-top').height()+11);
    loadMaps();

    $('#presentation').addClass('selected');
    currentPage = 'presentation';
    displayPresentation();
    
    $('a', '#menu-top').click(function()
    {
        if (clearClick)
        {
            $('a', '#menu-top').removeClass('selected');
            $('a', '#menu-list-content').removeClass('selected');
            $(this).addClass('selected');

            if ($(this).attr('id') == 'back-menu' && currentPage != $(this).attr('id')) backMenu();
            if ($(this).attr('id') == 'presentation' && currentPage != $(this).attr('id')) displayPresentation();
            if ($(this).attr('id') == 'bungalow' && currentPage != $(this).attr('id')) displayBungalow();
            if ($(this).attr('id') == 'history' && currentPage != $(this).attr('id')) displayHistory();
            if ($(this).attr('id') == 'spa' && currentPage != $(this).attr('id')) displaySpa();
            if ($(this).attr('id') == 'beauty_office' && currentPage != $(this).attr('id')) displayBeautyOffice();
            if ($(this).attr('id') == 'eat-drink' && currentPage != $(this).attr('id')) displayEatDrink();

            currentPage = $(this).attr('id');
        }
    });

    $('a', '#menu-list-content').click(function()
    {
        if (clearClick)
        {
            $('a', '#menu-top').removeClass('selected');
            $('a', '#menu-list-content').removeClass('selected');
            $(this).addClass('selected');

            if ($(this).attr('id') == 'back-menu' && currentPage != $(this).attr('id')) backMenu();
            if ($(this).attr('id') == 'presentation' && currentPage != $(this).attr('id')) displayPresentation();
            if ($(this).attr('id') == 'bungalow' && currentPage != $(this).attr('id')) displayBungalow();
            if ($(this).attr('id') == 'history' && currentPage != $(this).attr('id')) displayHistory();
            if ($(this).attr('id') == 'spa' && currentPage != $(this).attr('id')) displaySpa();
            if ($(this).attr('id') == 'eat-drink' && currentPage != $(this).attr('id')) displayEatDrink();
            if ($(this).attr('id') == 'lobby' && currentPage != $(this).attr('id')) displayLobby();
            if ($(this).attr('id') == 'bar' && currentPage != $(this).attr('id')) displayBar();
            if ($(this).attr('id') == 'solarium' && currentPage != $(this).attr('id')) displaySolarium();
            if ($(this).attr('id') == 'i-serge' && currentPage != $(this).attr('id')) displayISerge();
            if ($(this).attr('id') == 'ii-jean' && currentPage != $(this).attr('id')) displayIIJean();
            if ($(this).attr('id') == 'iii-charlotte' && currentPage != $(this).attr('id')) displayIIICharlotte();
            if ($(this).attr('id') == 'iv-fernand' && currentPage != $(this).attr('id')) displayIVFernand();
            if ($(this).attr('id') == 'v-georges' && currentPage != $(this).attr('id')) displayVGeorges();
            if ($(this).attr('id') == 'vi-juliette' && currentPage != $(this).attr('id')) displayVIJuliette();
            if ($(this).attr('id') == 'vii-pierre' && currentPage != $(this).attr('id')) displayVIIPierre();
            if ($(this).attr('id') == 'viii-alexandre' && currentPage != $(this).attr('id')) displayVIIIAlexandre();
            if ($(this).attr('id') == 'ix-mathieu' && currentPage != $(this).attr('id')) displayIXMathieu();

            currentPage = $(this).attr('id');
        }
    });

    if (!isIPhone && !isIPad)
    {
        $('a', '#menu-list-content').hover(function()
        {
            if ($(this).attr('id') == 'lobby')
            {
                $('#map-lobby-bar').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'bar')
            {
                $('#map-lobby-bar').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'solarium')
            {
                $('#map-solarium').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'i-serge')
            {
                $('#map-i').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'ii-jean')
            {
                $('#map-ii').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'iii-charlotte')
            {
                $('#map-iii').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'iv-fernand')
            {
                $('#map-iv').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'v-georges')
            {
                $('#map-v').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'vi-juliette')
            {
                $('#map-vi').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'vii-pierre')
            {
                $('#map-vii').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'viii-alexandre')
            {
                $('#map-viii').css('display', 'block');
                $('#map').css('display', 'none');
            }
            else if ($(this).attr('id') == 'ix-mathieu')
            {
                $('#map-ix').css('display', 'block');
                $('#map').css('display', 'none');
            }
        }, function()
        {
            $('.map-holder').css('display', 'none');
            $('#map').css('display', 'block');
        });
    }
}

function loadMaps()
{
    var img1 = new Image();
    var img2 = new Image();
    var img3 = new Image();
    var img4 = new Image();
    var img5 = new Image();
    var img6 = new Image();
    var img7 = new Image();
    var img8 = new Image();
    var img9 = new Image();
    var img10 = new Image();
    var img11 = new Image();
    var img12 = new Image();

    var ROOMS_HTML = '<map id="rooms" name="rooms">';
    ROOMS_HTML += '<area id="area-lobby-bar" title="'+LOBBY+' & '+BAR+'"  alt="'+LOBBY+' & '+BAR+'" shape="poly" coords="141,78,156,78,154,90,178,92,179,89,190,90,181,148,168,146,167,150,128,146,138,84,141,78" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-solarium" title="'+SOLARIUM+'"  alt="'+SOLARIUM+'" shape="poly" coords="72,176,99,156,126,160,134,169,138,177,108,210,103,205,104,198,86,178,78,180,72,176,112,92,131,93,128,121,110,119,112,92" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-i" title="I '+I_SERGE+'"  alt="I '+I_SERGE+'" shape="poly" coords="41,42,57,51,45,70,29,61,41,42" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-ii" title="II '+II_JEAN+'"  alt="II '+II_JEAN+'" shape="poly" coords="36,19,71,17,76,35,51,35,51,32,35,32,36,19" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-iii" title="III '+III_CHARLOTTE+'"  alt="III '+III_CHARLOTTE+'" shape="poly" coords="78,17,92,17,92,26,105,26,105,44,84,44,84,35,78,33,78,17" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-iv" title="IV '+IV_FERNAND+'"  alt="IV '+IV_FERNAND+'" shape="poly" coords="107,15,139,14,139,46,118,46,118,37,107,37,107,15" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-v" title="V '+V_GEORGES+'"  alt="V '+V_GEORGES+'" shape="poly" coords=160,68,177,70,178,64,185,64,185,74,192,75,190,88,178,86,177,90,157,88,160,68"" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-vi" title="VI '+VI_JULIETTE+'"  alt="VI '+VI_JULIETTE+'" shape="poly" coords="150,150,169,152,170,159,181,150,175,188,164,187,166,173,147,171,150,150" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-vii" title="VII '+VII_PIERRE+'"  alt="VII '+VII_PIERRE+'" shape="poly" coords="160,189,175,190,171,223,150,222,160,189" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-viii" title="VIII '+VIII_ALEXANDRE+'"  alt="VIII '+VIII_ALEXANDRE+'" shape="poly" coords="137,214,158,230,144,244,124,227,137,214" href="javascript:void(0)">';
    ROOMS_HTML += '<area id="area-ix" title="IX '+IX_MATHIEU+'"  alt="IX '+IX_MATHIEU+'" shape="poly" coords="159,232,169,232,166,257,158,257,156,261,149,261,150,249,146,245,159,232" href="javascript:void(0)">';
    ROOMS_HTML += '</map>';

    $(img1).load(function()
    {
        $('#map').html(this);
        $('#map').css('display', 'block');
        $(this).attr('usemap', '#rooms');
        $('#map').append(ROOMS_HTML);

        if (isIPad){
            $('#menu-social-icons').addClass('menu-social-icons-ipad');
        }

        $('area', '#rooms').click(function()
        {
            if (clearClick)
            {
                $('a', '#menu-list-content').removeClass('selected');

                if ($(this).attr('id') == 'area-lobby-bar')
                {
                    $('#lobby').addClass('selected');
                    currentPage = 'lobby';
                    displayLobby();
                }
                else if ($(this).attr('id') == 'area-solarium')
                {
                    $('#solarium').addClass('selected');
                    currentPage = 'solarium';
                    displaySolarium();
                }
                else if ($(this).attr('id') == 'area-i')
                {
                    $('#i-serge').addClass('selected');
                    currentPage = 'i-serge';
                    displayISerge();
                }
                else if ($(this).attr('id') == 'area-ii')
                {
                    $('#ii-jean').addClass('selected');
                    currentPage = 'ii-jean';
                    displayIIJean();
                }
                else if ($(this).attr('id') == 'area-iii')
                {
                    $('#iii-charlotte').addClass('selected');
                    currentPage = 'iii-charlotte';
                    displayIIICharlotte();
                }
                else if ($(this).attr('id') == 'area-iv')
                {
                    $('#iv-fernand').addClass('selected');
                    currentPage = 'iv-fernand';
                    displayIVFernand();
                }
                else if ($(this).attr('id') == 'area-v')
                {
                    $('#v-georges').addClass('selected');
                    currentPage = 'v-georges';
                    displayVGeorges();
                }
                else if ($(this).attr('id') == 'area-vi')
                {
                    $('#vi-juliette').addClass('selected');
                    currentPage = 'vi-juliette';
                    displayVIJuliette();
                }
                else if ($(this).attr('id') == 'area-vii')
                {
                    $('#vii-pierre').addClass('selected');
                    currentPage = 'vii-pierre';
                    displayVIIPierre();
                }
                else if ($(this).attr('id') == 'area-viii')
                {
                    $('#viii-alexandre').addClass('selected');
                    currentPage = 'viii-alexandre';
                    displayVIIIAlexandre();
                }
                else if ($(this).attr('id') == 'area-ix')
                {
                    $('#ix-mathieu').addClass('selected');
                    currentPage = 'ix-mathieu';
                    displayIXMathieu();
                }
            }
        });

        if (!isIPhone && !isIPad)
        {
            $('area', '#rooms').hover(function()
            {
                if ($(this).attr('id') == 'area-lobby-bar')
                {
                    $('#lobby').addClass('selected');
                    $('#bar').addClass('selected');
                    $('#map-lobby-bar').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-solarium')
                {
                    $('#solarium').addClass('selected');
                    $('#map-solarium').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-i')
                {
                    $('#i-serge').addClass('selected');
                    $('#map-i').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-ii')
                {
                    $('#ii-jean').addClass('selected');
                    $('#map-ii').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-iii')
                {
                    $('#iii-charlotte').addClass('selected');
                    $('#map-iii').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-iv')
                {
                    $('#iv-fernand').addClass('selected');
                    $('#map-iv').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-v')
                {
                    $('#v-georges').addClass('selected');
                    $('#map-v').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-vi')
                {
                    $('#vi-juliette').addClass('selected');
                    $('#map-vi').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-vii')
                {
                    $('#vii-pierre').addClass('selected');
                    $('#map-vii').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-viii')
                {
                    $('#viii-alexandre').addClass('selected');
                    $('#map-viii').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
                else if ($(this).attr('id') == 'area-ix')
                {
                    $('#ix-mathieu').addClass('selected');
                    $('#map-ix').css('display', 'block');
                    $('#map').stop(true, true).animate({'opacity':'0'}, 0);
                }
            }, function()
            {
                $('a', '#menu-list-content').removeClass('selected');
                $('#'+currentPage).addClass('selected');
                $('.map-holder').css('display', 'none');
                $('#map').css('display', 'block');
                $('#map').stop(true, true).animate({'opacity':'1'}, 0);
            });
        }
    }).attr('src', 'images/map.png');

    $(img2).load(function(){$('#map-lobby-bar').html(this);}).attr('src', 'images/map-lobby-bar.png');
    $(img3).load(function(){$('#map-solarium').html(this);}).attr('src', 'images/map-solarium.png');
    $(img4).load(function(){$('#map-i').html(this);}).attr('src', 'images/map-i.png');
    $(img5).load(function(){$('#map-ii').html(this);}).attr('src', 'images/map-ii.png');
    $(img6).load(function(){$('#map-iii').html(this);}).attr('src', 'images/map-iii.png');
    $(img7).load(function(){$('#map-iv').html(this);}).attr('src', 'images/map-iv.png');
    $(img8).load(function(){$('#map-v').html(this);}).attr('src', 'images/map-v.png');
    $(img9).load(function(){$('#map-vi').html(this);}).attr('src', 'images/map-vi.png');
    $(img10).load(function(){$('#map-vii').html(this);}).attr('src', 'images/map-vii.png');
    $(img11).load(function(){$('#map-viii').html(this);}).attr('src', 'images/map-viii.png');
    $(img12).load(function(){$('#map-ix').html(this);}).attr('src', 'images/map-ix.png');
}

function backMenu()
{
    if (isIPad){
        $('#menu-social-icons').removeClass('menu-social-icons-ipad');
    }
    currentPage = '';
    $('#menu-list').css('margin-top', 20);
    $('#menu-top').html('');
    clearClick = false;
    if (isIE)
    {
        $('#content').animate({'margin-left':$(window).width()}, 600, function()
        {
            $('#content').css('display', 'none');
            initMenuList();
            RPMenu();
            $('#home-text').css('display', 'block');
            //initTexts(1);
            $('#home-text').stop(true, true).animate({'opacity':'1'}, 600);
            $('#news').css('display', 'block');
            $('#news').stop(true, true).animate({'margin-top':$(window).height()-$('#news').height()-50}, 600);
            clearClick = true;
        });
    }
    else
    {
        $('#menu-list').stop(true, true).animate({'opacity':'0'}, 0, function()
        {
            initMenuList();
            RPMenu();
            $('#content').animate({'margin-left':$(window).width(), 'opacity':'0'}, 600, function()
            {
                $('#content').css('display', 'none');
                $('#news').stop(true, true).animate({'opacity':'0'}, 0, function()
                {
                    $('#home-text').css('display', 'block');
                    initTexts(1);
                    $('#home-text').stop(true, true).animate({'opacity':'1'}, 600);
                    $('#news').css('display', 'block');
                    $('#news').stop(true, true).animate({'margin-top':$(window).height()-$('#news').height()-50, 'opacity':'1'}, 600);
                });
            });
            $('#menu-list').stop(true, true).animate({'opacity':'1'}, 800, function(){clearClick = true;});            
        });
    }
}

function backMenu3()
{
    if (isIPad){
        $('#menu-social-icons').removeClass('menu-social-icons-ipad');
    }
    currentPage = '';
    $('#menu-list').css('margin-top', 20);
    $('#menu-top').html('');
    clearClick = false;
    
        $('#content').animate({'margin-left':$(window).width()}, 600, function()
        {
            $('#content').css('display', 'none');
            initMenuList();
            RPMenu();
            $('#home-text').css('display', 'block');
            initTexts(1);
            $('#home-text').stop(true, true).animate({'opacity':'1'}, 600);
            $('#news').css('display', 'block');
            $('#news').stop(true, true).animate({'margin-top':$(window).height()-$('#news').height()-50}, 600);
            clearClick = true;
        });
    
}

function backMenu2()
{
    if (isIPad){
        $('#menu-social-icons').removeClass('menu-social-icons-ipad');
    }
    currentPage = '';
    $('#menu-list').css('margin-top', 20);
    $('#menu-top').html('');
    clearClick = false;
    if (isIE)
    {
        $('#content').animate({'margin-left':$(window).width()}, 600, function()
        {
            $('#content').css('display', 'none');
            initMenuList();
            RPMenu();
            clearClick = true;
        });
    }
    else
    {
        $('#menu-list').stop(true, true).animate({'opacity':'0'}, 0, function()
        {
            initMenuList();
            RPMenu();
            $('#menu-list').stop(true, true).animate({'opacity':'1'}, 800, function(){clearClick = true;});
        });
    }
}

function displayPresentation()
{
    displayGalleryWithContent(1, 1);
}

function displayBungalow()
{
    $('a', '#menu-top').removeClass('selected');
    $('a', '#menu-list-content').removeClass('selected');
    $('#bungalow').addClass('selected');
    currentPage = 'bungalow';

    displayGalleryWithContent(2, 2);
}

function displayHistory()
{

    clearClick = false;
    if (isIE)
    {
        if ($('#content').css('display') == 'none')
        {
            $('#news').stop(true, true).animate({'margin-top':$(window).height()}, 600, function()
            {
                $('#news').css('display', 'none');
                $('#home-text').css('display', 'none');
                $('#content').css('display', 'block');
                initHistory();
            });
        }
        else
        {
            $('#content').animate({'margin-left':$(window).width()}, 600, function()
            {
                initHistory();
            });
        }
    }
    else
    {
        if ($('#content').css('display') == 'none')
        {
            $('#content').stop(true, true).animate({'opacity':'0'}, 0,  function()
            {
                $('#news').stop(true, true).animate({'margin-top':$(window).height()}, 600, function()
                {
                    $('#news').css('display', 'none');
                    $('#content').css('display', 'block');
                    initHistory();
                });
            });
        }
        else
        {
            $('#content').animate({'margin-left':$(window).width(), 'opacity':'0'}, 600, function()
            {
                initHistory();
            });
        }
    }
}

function initHistory()
{
    pageType = 2;
    $('#content-fix').html('');
    $('#content-fix').width(350);
    $('#content-scroll-content').html('');
    $('#content-fix').css('position', 'absolute');
    $('#content-scroll').width(340);
    $('#content-scroll').css('position', 'absolute');
    $('#content-scroll').css('margin-left', 370);
    $('#content-scroll-content').width(330);

    var galleryData = '';
    $('#content-scroll-content').html('');

    $('#content-loader').css('display', 'block');
    $.post('libraries/com/dop/php/ThumbnailGallery.php', {galleryID:3}, function(data)
    {
        galleryData = data;

        $.post('includes/php/text.php', {id:3}, function(data)
        {
            $('#content-loader').css('display', 'none');

            $('#content-fix').css('display', 'block');
            $('#content-scroll').css('display', 'block');

            gallery.reset();
            gallery.init("3", "#content-fix", galleryData);
            $('#content-scroll-content').html(data);

            RPContent();

            if (isIE) clearClick = true;
            else $('#content').stop(true, true).animate({'opacity':'1'}, 300, function(){clearClick = true;});
        });
    });
}

function displaySpa()
{
    displayGalleryWithContent(4, 4);
}

function displayBeautyOffice()
{

    clearClick = false;
    if (isIE)
    {
        if ($('#content').css('display') == 'none')
        {
            $('#news').stop(true, true).animate({'margin-top':$(window).height()}, 600, function()
            {
                $('#news').css('display', 'none');
                $('#home-text').css('display', 'none');
                $('#content').css('display', 'block');
                initBeautyOffice();
            });
        }
        else
        {
            $('#content').animate({'margin-left':$(window).width()}, 600, function()
            {
                initBeautyOffice();
            });
        }
    }
    else
    {
        if ($('#content').css('display') == 'none')
        {
            $('#content').stop(true, true).animate({'opacity':'0'}, 0,  function()
            {
                $('#news').stop(true, true).animate({'margin-top':$(window).height()}, 600, function()
                {
                    $('#news').css('display', 'none');
                    $('#content').css('display', 'block');
                    initBeautyOffice();
                });
            });
        }
        else
        {
            $('#content').animate({'margin-left':$(window).width(), 'opacity':'0'}, 600, function()
            {
                initBeautyOffice();
            });
        }
    }
}

function initBeautyOffice()
{
    pageType = 2;
    $('#content-fix').html('');
    $('#content-fix').width(350);
    $('#content-scroll-content').html('');
    $('#content-fix').css('position', 'absolute');
    $('#content-scroll').width(340);
    $('#content-scroll').css('position', 'absolute');
    $('#content-scroll').css('margin-left', 370);
    $('#content-scroll-content').width(330);

    var galleryData = '';
    $('#content-scroll-content').html('');

    $('#content-loader').css('display', 'block');
    $.post('libraries/com/dop/php/ThumbnailGallery.php', {galleryID:20}, function(data)
    {
        galleryData = data;

        $.post('includes/php/text.php', {id:39}, function(data)
        {
            $('#content-loader').css('display', 'none');

            $('#content-fix').css('display', 'block');
            $('#content-scroll').css('display', 'block');

            gallery.reset();
            gallery.init("20", "#content-fix", galleryData);
            $('#content-scroll-content').html(data);

            RPContent();

            if (isIE) clearClick = true;
            else $('#content').stop(true, true).animate({'opacity':'1'}, 300, function(){clearClick = true;});
        });
    });
}

function displayEatDrink()
{
    displayGalleryWithContent(5, 5);
}

function displayLobby()
{
    displayGalleryWithContent(6, 6);
}

function displayBar()
{
    displayGalleryWithContent(7, 7);
}

function displaySolarium()
{
    displayGalleryWithContent(8, 8);
}

function displayISerge()
{
    displayGalleryWithContent(9, 9, I_SERGE_TITLE);
}

function displayIIJean()
{
    displayGalleryWithContent(10, 12, II_JEAN_TITLE);
}

function displayIIICharlotte()
{
    displayGalleryWithContent(11, 15, III_CHARLOTTE_TITLE);
}

function displayIVFernand()
{
    displayGalleryWithContent(12, 18, IV_FERNAND_TITLE);
}

function displayVGeorges()
{
    displayGalleryWithContent(13, 21, V_GEORGES_TITLE);
}

function displayVIJuliette()
{
    displayGalleryWithContent(14, 24, VI_JULIETTE_TITLE);
}

function displayVIIPierre()
{
    displayGalleryWithContent(15, 27, VII_PIERRE_TITLE);
}

function displayVIIIAlexandre()
{
    displayGalleryWithContent(16, 30, VIII_ALEXANDRE_TITLE);
}

function displayIXMathieu()
{
    displayGalleryWithContent(17, 33, IX_MATHIEU_TITLE);
}
