window.addEvent('domready', function()
{
    /* Properties */

    var NavigateContentSlide  = new Fx.Slide  ('NavigateContent'     , {duration:400, wait:false});
    var NavigateContentFade   = new Fx.Styles ('NavigateContentOuter', {duration:100, wait:false});
    var NavigateButton1Fade   = new Fx.Styles ('NavigateButton1'     , {duration:100, wait:false});
    var NavigateButton0Fade   = new Fx.Styles ('NavigateButton0'     , {duration:100, wait:false});

    var MessagesContentSlide  = new Fx.Slide  ('MessagesContent'     , {duration:400, wait:false});
    var MessagesContentFade   = new Fx.Styles ('MessagesContentOuter', {duration:100, wait:false});
    var MessagesButton1Fade   = new Fx.Styles ('MessagesButton1'     , {duration:100, wait:false});
    var MessagesButton0Fade   = new Fx.Styles ('MessagesButton0'     , {duration:100, wait:false});

    /* Test to see if our cookies exists */

    if (!Cookie.get('MessagesContentVisible')) 
    { 
        Cookie.set('MessagesContentVisible','true',{domain:'tokiohoteldoesamerica.com', path:'/', duration : 365}); 
        MessagesButton1Fade.set({'opacity':'0'}); 
    }

    else
    {
        if (Cookie.get('MessagesContentVisible') == 'true' ) { MessagesButton1Fade.set({'opacity':'0'});                       }
        if (Cookie.get('MessagesContentVisible') == 'false') { MessagesButton0Fade.set({'opacity':'0'}); MessagesContentSlide.hide() ; } }

    if (!Cookie.get('NavigateContentVisible'))
    {
        Cookie.set('NavigateContentVisible','true',{domain:'tokiohoteldoesamerica.com', path:'/', duration : 365});
        NavigateButton1Fade.set({'opacity':'0'});
    }

    else
    {
        if (Cookie.get('NavigateContentVisible') == 'true' ) { NavigateButton1Fade.set({'opacity':'0'});                       }
        if (Cookie.get('NavigateContentVisible') == 'false') { NavigateButton0Fade.set({'opacity':'0'}); NavigateContentSlide.hide() ; }
    }

    $('MessagesSlidein' ).addEvent('click', function(e) { e = new Event(e) ; MessagesContentFade.start({'opacity':'100'}) ; MessagesButton1Fade.start({'opacity':  '0'}) ; MessagesButton0Fade.start({'opacity':'100'}) ; MessagesContentSlide.slideIn()  ; Cookie.set('MessagesContentVisible', 'true' ) ; e.stop() ; });
    $('MessagesSlideout').addEvent('click', function(e) { e = new Event(e) ; MessagesContentFade.start({'opacity':  '0'}) ; MessagesButton1Fade.start({'opacity':'100'}) ; MessagesButton0Fade.start({'opacity':  '0'}) ; MessagesContentSlide.slideOut() ; Cookie.set('MessagesContentVisible', 'false') ; e.stop() ; });
    $('NavigateSlidein' ).addEvent('click', function(e) { e = new Event(e) ; NavigateContentFade.start({'opacity':'100'}) ; NavigateButton1Fade.start({'opacity':  '0'}) ; NavigateButton0Fade.start({'opacity':'100'}) ; NavigateContentSlide.slideIn()  ; Cookie.set('NavigateContentVisible', 'true')  ; e.stop() ; });
    $('NavigateSlideout').addEvent('click', function(e) { e = new Event(e) ; NavigateContentFade.start({'opacity':  '0'}) ; NavigateButton1Fade.start({'opacity':'100'}) ; NavigateButton0Fade.start({'opacity':  '0'}) ; NavigateContentSlide.slideOut() ; Cookie.set('NavigateContentVisible', 'false') ; e.stop() ; });

});
