
$(document).ready(function(){

	$('#infoSlideHolder1').cycle({
	    fx:    'scrollHorz',
	    timeout:  12000,
	    speed: "fast",
	    nowrap: true,
	    end: call_tab,
	    next:'#next_1',
	    prev:'#prev_1'
	});

	$('#infoSlideHolder2').cycle({
	    fx:    'scrollHorz',
	    timeout:  12000,
	    speed: "fast",
	    nowrap: true,
	    end: call_tab,
	    next:'#next_2',
	    prev:'#prev_2'
	});

	$('#infoSlideHolder3').cycle({
	    fx:    'scrollHorz',
	    timeout:  12000,
	    speed: "fast",
	    nowrap: true,
	    next:'#next_3',
	    prev:'#prev_3',
	    end: call_tab
	});

	//fire();

});

function call_tab()
{
    if(tar == 3)
    {
	tar2 = 1;
    }
    else
    {
	tar2 = tar+1;
    }

    $('#infoSlideHolder'+tar).cycle(0);
    $('#infoSlideHolder'+tar).cycle('pause');
    $('#infoSlideHolder'+tar2).cycle('resume');
    $('#tab'+tar).hide();
    $('#tab'+tar2).css("display","block");
    tar++;
    if(tar == 4)
    {
	tar = 1;
    }

	$('#tab_cont'+tar).addClass('active');
	$(old_active).removeClass('active');
	old_active = "#tab_cont"+tar;
};

