$(document).ready(function(){
	
	//This keeps track of the slideshow's current location
	var current_panel = 1;
	//Controlling the duration of animation by variable will simplify changes
	var animation_duration = 2500;
	
    $("#title").text("Calatorii");
    $("#text").text("Dupa ce am cucerit lumea ... am plecat sa o si vad ... este unul din motivele pentru care traiesc!");
    
	$.timer(6000, function (timer) {
		//Determine the current location, and transition to next panel
		switch(current_panel){
			case 1:
                $("#slideshow").stop().animate({left: "-495px", top: "0px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 2;
			break;
			case 2:
				$("#slideshow").stop().animate({left: "0px", top: "-355px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 3;
			break;
			case 3:
				$("#slideshow").stop().animate({left: "-495px", top: "-355px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 4;
			break;
			case 4:
                $("#title").text("Cenaclu");
				$("#text").text("Colt de pagina rezervat pentru arte ... asa cum le intelegem noi ...");
				$("#slideshow").stop().animate({left: "0px", top: "-710px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 5;
			break;
			//
            case 5:
				$("#slideshow").stop().animate({left: "-495px", top: "-710px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 6;
			break;
			case 6:
				$("#slideshow").stop().animate({left: "0px", top: "-1065px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 7;
			break;
			case 7:
				$("#slideshow").stop().animate({left: "-495px", top: "-1065px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 8;
			break;
			case 8:
                $("#title").text("IceWorld");
				$("#text").text("Un blog in care gasiti ... din TOATE ... cate NIMIC");
				$("#slideshow").stop().animate({left: "0px", top: "-1420px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 9;
			break;
			//	
			case 9:
				$("#slideshow").stop().animate({left: "-495px", top: "-1420px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 10;
			break;
			case 10:
				$("#slideshow").stop().animate({left: "0px", top: "-1775px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 11;
			break;
			case 11:
				$("#slideshow").stop().animate({left: "-495px", top: "-1775px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 12;
			break;
			case 12:
                $("#title").text("Tehnologie/teste/review's");
				$("#text").text("Una din pasiunile mele este tehnologia ... povestea mea in aceasta lume incepe inainte cu multi anii ... inca de cand HC2000 era o minune tehnologica. Am rezervat pentru aceasta pasiune acest colt ... unde veti gasi noutati de ultima oara pe care le public si intr'o revista online de profil.");
				$("#slideshow").stop().animate({left: "0px", top: "-2130px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 13;
			break;
            case 13:
				$("#slideshow").stop().animate({left: "-495px", top: "-2130px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 14;
			break;
			case 14:
				$("#slideshow").stop().animate({left: "0px", top: "-2485px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 15;
			break;
			case 15:
				$("#slideshow").stop().animate({left: "-495px", top: "-2485px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 16;
			break;
			case 16:
                $("#title").text("Fotografie");
				$("#text").text("Uneori o imagine poate exprima mai mult decat 1000 de cuvinte ... aici ... cuvintele tac ... si raman doar clipe rapite din trecerea noastra prin timp ...");
				$("#slideshow").stop().animate({left: "0px", top: "-2840px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 17;
			break;	
			case 17:
                $("#title").text("Calatorii");
                $("#text").text("Dupa ce am cucerit lumea ... am plecat sa o si vad ... este unul din motivele pentru care traiesc!");
                $("#slideshow").stop().animate({left: "0px", top: "0px"}, {easing: 'easeOutBack', duration: animation_duration});
				current_panel = 1;
			break;	
	
	  		timer.reset(12000);
		}
	});
	
});
