function slika_slideshow_component(p_image_prefix, p_obj_name, p_image_count) {
	this._img_count = p_image_count;
	this._img_prefix = p_image_prefix;
	this._current   = 0;
	this._time_out  = 4000;
	this._obj_name  = p_obj_name;
	
	var obj = this;
	
	this._init = function() {
		if (this._img_count > 1) {
			window.setInterval(this._obj_name + '._show_next()',this._time_out);
		}
	}
	
	this._show_next= function() {
		var next = this._current + 1;
		//this._current++;
		if (next > this._img_count) {
			next = 0;
		}
		
		$('#'+this._img_prefix+this._current).fadeOut('fast',function(){
			$('#'+obj._img_prefix+next).fadeIn('fast');
			obj._current = next;
		});
	}
	this._init();
}

function cmp_naslovnica_weather_renderer( p_max_count, p_prefix)
{
    this._max_count = p_max_count; // default
    this._current_index = 0;
    this._prefix = p_prefix
    
    this.next = function()
    {
        var new_index = this._current_index + 1;
        if( new_index == this._max_count ){
            new_index = 0;
        }
    
        $( '#' + this._prefix + this._current_index ).hide();
        $( '#' + this._prefix + new_index ).show();
    
        this._current_index = new_index;
    },
    
    this.prev = function()
    {
        var new_index = this._current_index - 1;
        if( new_index < 0 ){
            new_index = this._max_count - 1;
        }
    
        $( '#' + this._prefix + this._current_index ).hide();
        $( '#' + this._prefix + new_index ).show();
    
        this._current_index = new_index;
    }
    
}


function cmp_stock_exchange_data_renderer( p_app_rewrite_base )
{

    this.app_rewrite_base = p_app_rewrite_base,
    this._current_index_tab = 'ZSE',

    this.show_stock_index_tab = function( p_tab )
    {
        $( '#div_stock_index_' + this._current_index_tab ).hide();
        $( '#div_stock_index_' + p_tab ).show();

        $( '#menu_stock_index_' + p_tab ).addClass( 'active' );
        $( '#menu_stock_index_' + this._current_index_tab ).removeClass( 'active' );

        this._current_index_tab = p_tab;
    }
}



