/* Author: John Knowles, Nzime

*/
$(document).ready(function() {
    
    $('a').click(function(){
        $(this).blur();
    });
    
    $('#video-salon').click(function(){
        $('#video-container').html('<iframe src="http://player.vimeo.com/video/28348587?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff&amp;autoplay=1" width="670" height="375" frameborder="0"></iframe>');
        videoWindowOpen();
        return false;
    });
    
    $('#video-spa').click(function(){
        $('#video-container').html('<iframe src="http://player.vimeo.com/video/28348495?title=0&amp;byline=0&amp;portrait=0&amp;color=ffffff&amp;autoplay=1" width="670" height="375" frameborder="0"></iframe>');
        videoWindowOpen();
        return false;
    });
    
    function videoWindowOpen(){
        $('.header-left').animate({borderRightWidth:335}, 1000);
        $('.header-right').animate({borderLeftWidth:335}, 1000);
        $('.header-50').animate({height:410}, 1000);
        $('#header').animate({height:410}, 1000);
        $('.header-video').delay(800).fadeIn(1000);
        return false;
    }
    
    $('#video-close').click(function(){
        $('.header-video').fadeOut(500);
        $('.header-left').delay(400).animate({borderRightWidth:5}, 1000);
        $('.header-right').delay(400).animate({borderLeftWidth:5}, 1000);
        $('#video-container').html('');
        if (!$('#home').length)
        {
            $('#header').delay(400).animate({height:205}, 1000);
        }
        return false;
    });
    
    $('.accordion').accordion({header:'h2','collapsible':true,'autoHeight':false});
    
});


