jQuery.noConflict();

var animationState = true;
var animationTimeout = 4000;
var animationDelay = 1000;
var animationSpeed = 900;
var animationFx = 'fade';

//set hyperlink href & description
function changeAnimationContent(title, headline, link, link_desc){
	jQuery('#animationLink').attr('href',link).html(link_desc);
	jQuery('#animationHeadline').html(headline);
}

function stopAnimation(){
	jQuery('#animationBox').cycle('pause');
	jQuery('#animationPauseButton').attr('src', '/data/icons/pause_animation_orange.gif');
	jQuery('#animationPauseButton').attr('title', 'resume');
	this.animationState =false;
}

function toggleAnimation(){
	if(this.animationState==true){
		this.stopAnimation();
	}else{
		jQuery('#animationBox').cycle('resume');
		jQuery('#animationPauseButton').attr('src', '/data/icons/pause_animation_grey.gif');
		jQuery('#animationPauseButton').attr('title', 'stop');
		this.animationState =true;
	}
}

function nextImage(){
	this.stopAnimation();
	jQuery('#animationBox').cycle('next');
}

function prevImage(){
	this.stopAnimation();
	jQuery('#animationBox').cycle('prev');
}

//set animationstate(Flag) true & start the timeout
function startAnimation(){
	jQuery('#animationImages').cycle('resume');
	this.animationState=true;
}

jQuery(function() {
	var container = jQuery('#animationBox').cycle({fx: animationFx, speed: animationSpeed, timeout: animationTimeout, delay:animationDelay, cleartype:  1});
	
	/**
	 * 21.03.2011 - David Leschnik
	 * ***************************
	 * add this cycle animation for 
	 * the whole productanimation 
	 * ***************************
	 */
	
	var items = jQuery('#animationItems').cycle({fx: animationFx, speed: 500, timeout: animationTimeout, delay:3400, cleartype:  1 });


});

