iws = {
	actual: 0,
	
	timer: undefined,
	
	item_list: undefined,
	
	init: function() {
		$( document ).ready( function() {
		
			iws.item_list = $.makeArray( $( '.reference' ) );
			$( iws.item_list[ 0 ] ).show();
			iws.startTimer();
		} );
	},
	
	startTimer: function() {
		iws.timer = setTimeout( 'iws.showHide()', 7000 );
	},
	
	showHide: function() {
		var next = iws.actual + 1;
		if( next == iws.item_list.length ) {
			next = 0;
		}

		if( jQuery.support.objectAll != false ) {
			$( iws.item_list[ iws.actual ] ).fadeOut( 3000 );
			$( iws.item_list[ next ] ).fadeIn( 3000 );
		} else {
			$( iws.item_list[ iws.actual ] ).hide();
			$( iws.item_list[ next ] ).show();
		}
		
		iws.actual = next;
		
		iws.startTimer();
	}
}


iws.init();

