﻿var count = 0;
var current = 0;
var next = 0;
//the name of the div we are going to use
var objectName = "#aktuelle";

function UpdateCounter(items)
{
	current = count % items;	
	count++;
	next = count % items;

}

function xSetHeight(h, objToChange)
{         
    var i = h + 20;   
    document.getElementById(objToChange).style.height = h + 'px';   
  
}

function MaxValueInArray(arr) {
    var max = arr[0];
    var len = arr.length;
    for (var i = 1; i < len; i++) if (arr[i] > max) max = arr[i];
    return max;
}

function FadeItem(objCurrent, objNext)
{
	jQuery(function($){ 
	
	var nextObj = $(objNext); 
	var currentObj = $(objCurrent);
	if (nextObj.length === 1) {
		nextObj.queue(function(){ 
			 setTimeout(function(){ 
				nextObj.fadeIn(); currentObj.fadeOut('slow');nextObj.dequeue(); 
			}, 4000 ); 
		});
	};
	}); 
	
 
}






