jQuery.fn.ticker = function() {
	$.fn.ticker.Index = 0;
	$(this).find(".row").each(function(i) {
		$.fn.ticker.Index++;
	});
	$.fn.ticker.CurrentIndex = 0;
	window.setInterval("$.fn.ticker.next()", $.fn.ticker.defaults.ShowTime);
};

$.fn.ticker.defaults = {
	ShowTime: 5000,
	aniTime: 200
};
jQuery.fn.ticker.next = function() {
	i = $.fn.ticker.CurrentIndex+1;
	$.fn.ticker.show(i)
}

jQuery.fn.ticker.show = function(i) {
	if(i>=$.fn.ticker.Index) i = 0;
	$.fn.ticker.NextIndex = i;
	var obj = $(".ticker").find(".row").eq($.fn.ticker.CurrentIndex)
	obj.fadeOut($.fn.ticker.defaults.aniTime,jQuery.fn.ticker.show_r);


}
jQuery.fn.ticker.show_r = function() {
	// next
	$.fn.ticker.CurrentIndex = $.fn.ticker.NextIndex;
	var obj = $(".ticker").find(".row").eq($.fn.ticker.CurrentIndex)
	obj.show($.fn.ticker.defaults.aniTime);
}




$(document).ready(function() {
	$(".ticker").ticker();
	$(".ticker").click(function() {
			window.location.href = "/index.php?id=11";
		});
}) ;

