$(document).ready(function () {
    $("#slider ul li:gt(0)").hide();
    setInterval(function () { slide(); }, 2000);
    
    var now = 0;
    var imgs = 4;
    function slide() {
        now = now == imgs ? 0 : ++now;
        $("#slider ul li").eq(now - 1).fadeOut(1000);
        $("#slider ul li").eq(now).fadeIn(1000);
    }
});