  var SlideShow = function( container, millisec ) {
    this.container = container;
    this.millisec = ( parseInt( millisec ) > 0 ) ? parseInt( millisec ) : 4000;
    this.jImages = jQuery( '#' + container + ' > img');
    this.imagesLength = this.jImages.length;
    this.currentImage = 0;
    this.slideImage = function() {
      var current_image = this.jImages.eq( this.currentImage );
      this.currentImage++;
      if ( this.currentImage >= this.imagesLength ) { this.currentImage = 0; }
      var next_image = this.jImages.eq( this.currentImage );
      current_image.css( { 'z-index' : 1 } ).fadeOut( 2000 );
      next_image.css( { 'z-index' : -1 } ).show();
      //next_image.fadeIn( 2000 );
      //this.stop();
    };
    this.start = function() {
      if ( this.imagesLength > 1 ) {
        var self = this;
        
        this.timer = setInterval( function() {
          self.slideImage();
        }, this.millisec );
      }
    };
    this.stop = function() {
      clearInterval( this.timer );
    };
  };
  
  jQuery( window ).load( function( eventObject ) {
    var slideShow = new SlideShow( 'slideshow' );
    slideShow.start();
  });
  
  jQuery( document ).ready( function( $ ) {
    
  } );
