// Animate menu
$(function() {
    $("footer nav").hide();
    $("#menu-button").click(function(e){
        event.preventDefault(e);
    })
    $("#menu-button").mouseover(function() {
        $("footer nav").animate({"width":"show"});
    });
});

// Splash screen
$(function() {
    $("#splash").show().delay(2500).fadeOut();
    $("body.home footer nav").delay(3250).animate({"width":"show"});
    $("body.error404 footer nav").delay(1500).animate({"width":"show"});
});


// Studio gallery
$(function() {
    // Get orig img
    var o_img = $('#main-img').attr('src');
    // Img swap
    $("#gallery li img")
    .hover(
        function(){
            $('#main-img').attr('src',$(this).attr('src').replace('thumb/', ''));
        },
        function(){
            $('#main-img').attr('src',o_img);
        }
    );

});

// Clients slide-in
$(function() {
    $("#slide-clients").click(function() {
        $("#client-logos").animate({"width":"show"});
        $("footer nav").delay(1000).animate({"width":"show"});
    });
});

// Content sliders
$(function() {
    $('#coda-slider-1').codaSlider();
});

// Work slider
$(function() {
    $("#work-button").click(function() {
        $("#work-container").animate({"marginLeft":"-915px"});
    });
});

// How do slider
$(function() {
    $("#how-do-button").click(function() {
        $("#how-do-container").animate({"marginLeft":"-915px"});
    });
});

// Remove Newsflash
$(function() {
    $("nav.active a:first").addClass("latest-news");
    $("nav.active a").click(function() {
        if ($(this).hasClass("latest-news")) {
            $("#news-flash").delay(500).animate({"height":"show"},300);
        } else {
            $("#news-flash").delay(200).fadeOut(100);
        };
        
    });
});

// Team list FF fix
$(function() {
    // alert($.browser);
    if ($.browser.mozilla) {
        $("#team-static li").addClass("ff-fix");
    }
});

// iPhone 3G fix
// $(function() {
//     
// });
