﻿        $(function() {
            if ($("#gallery").children().length > 1) {
                $("#gallery").children().css("display", "none");
                $("#gallery img:first").fadeIn(0);

                function removeFirst() {
                    $("#gallery img:first").fadeOut(750, function() {
                        $("#gallery").append($("#gallery img:first"));
                        $("#gallery img:first").fadeIn(1000);
                    });
                }
                
                setInterval(removeFirst, 12000);
            }
        });