﻿

var app = {

    appname: 'bj-office',

    init: function() {
        $('#mySlideShow IMG.active').show();
        setInterval("app.slideSwitch()", 2500);
    },

    slideSwitch: function() {
        $('#mySlideShow IMG').show();
        var $active = $('#mySlideShow IMG.active');
        if ($active.length == 0) $active = $('#mySlideShow IMG:last');
        var $next = $active.next().length ? $active.next() : $('#mySlideShow IMG:first');
        $active.addClass('last-active');
        $next.css({ opacity: 0.0 })
			.addClass('active')
			.animate({ opacity: 1.0 }, 1000, function() {
			    $active.removeClass('active last-active');
			});
    }

};



$(document).ready(function() {
    $(document).pngFix();
    app.init();
});

