(function($) {


    $(document).ready(function(){

    	function showLogo()
	    {
            $('#logo').animate({opacity: 1.0}, 500, function() {
                $(this).fadeIn("slow", showStructure());
            });
        }

    	function showStructure()
	    {
            $('#structure').animate({opacity: 1.0}, 500, function() {
                $(this).fadeIn("slow").animate({opacity: 1.0}, delay, function() {
                    $(this).fadeOut("slow", showLangLinks());
                });
            });
        }

        function showLangLinks()
	    {
            $('#en').animate({opacity: 1.0}, 500, function() {
                $(this).fadeIn("slow");

                $('#de').animate({opacity: 1.0}, delay, function() {
                    $(this).fadeIn("slow");

                    $('#fr').animate({opacity: 1.0}, delay, function() {
                        $(this).fadeIn("slow");

                        $('#it').animate({opacity: 1.0}, delay, function() {
                            $(this).fadeIn("slow");
                        });
                    });
                });
            });
        }

        var isMSIE = false;

		var agent = navigator.userAgent.toLowerCase();

        if (agent.indexOf('msie')>-1)
        {
			isMSIE = true;
		}

        var delay = 1100;


		$('#structure').hide();
        $('#en').hide();
        $('#de').hide();
        $('#fr').hide();
        $('#it').hide();


		/*if (isMSIE == true)
		{
			showStructure();
		}
		else
		{*/
			$('#logo').hide();
			showLogo();
		//}

    });

})(jQuery);