
/* All time units are milliseconds. */
var featureDuration = 300;          /* The time it takes for a feature box to appear. */
var pause = 25;                     /* The time between a feature box becoming fully visible and the next one starting to appear. */

$(document).ready(function(){

	if (/MSIE/i.test(navigator.userAgent)) return;

    var elements = $(".feature .inner, #showreel .inner, .new-hiring .inner, .person .inner, #slideshow .inner, #short-film .inner, #book .inner, #join-ping-pong .inner");
    elements.each(function() {
        $(this).css("opacity", "0");
	});

    function showElements(elements) {
        var current = elements.eq(0);
        current.animate({
            opacity: "1"
        }, featureDuration, "linear", window.setTimeout(function() {
            showElements(elements.slice(1));
        }, featureDuration+pause));
    }

    window.setTimeout(function() {
        showElements(elements);
    }, 200);
});

