$(document).ready(function(){
	//teaserwrapper = $('#teaser_imagewrapper');
	$('#teaser_wrapper').attr('style', 'width=100%');
	teaserwrapper = $('#teaser_wrapper');
     
	/*For pausing transition of slide when any error occurs*/
	if($('#teaser1_special p').length) {
	if ($('p').is(':empty')) { 

	teaserwrapper.cycle({
		fx: 'fade',	
		speed: 500,
		timeout: 8000
		//timeout: 0
	});
	     }
	     else{
	      
	teaserwrapper.cycle({
		fx: 'fade',	
		speed: 500,
	//	timeout: 8000
		timeout: 0
	});
	     }
	}
	else{
	teaserwrapper.cycle({
		fx: 'fade',	
		speed: 500,
		timeout: 8000
		//timeout: 0
	});
	}
//	speed: 4000, timeout: 2000
	$('#goto11').click(function() { 
	    teaserwrapper.cycle(0);
	    teaserwrapper.cycle('pause');
	    return false; 
	}); 
	 
	$('#goto12').click(function() {  
	    teaserwrapper.cycle(1);  
	    teaserwrapper.cycle('pause');
	    return false;  
	}); 
	$('#goto13').click(function() {  
	    teaserwrapper.cycle(2); 
	    teaserwrapper.cycle('pause');
	    return false;  
	});

	$('#goto21').click(function() { 
	    teaserwrapper.cycle(0); 
	    teaserwrapper.cycle('pause');
	    return false; 
	}); 
	 
	$('#goto22').click(function() {  
	    teaserwrapper.cycle(1);  
	    return false;  
	}); 
	$('#goto23').click(function() {  
	    teaserwrapper.cycle(2);  
	    teaserwrapper.cycle('pause');
	    return false;  
	});

	$('#goto31').click(function() { 
	    teaserwrapper.cycle(0); 
	    teaserwrapper.cycle('pause');
	    return false; 
	}); 
	 
	$('#goto32').click(function() {  
	    teaserwrapper.cycle(1);  
	    teaserwrapper.cycle('pause');
	    return false;  
	}); 
	$('#goto33').click(function() {  
	    teaserwrapper.cycle(2);  
	    teaserwrapper.cycle('pause');
	    return false;  
	}); 
	
	$('#element2').focus(function() { 
		teaserwrapper.cycle(0); 
	    	teaserwrapper.cycle('pause');
	    	return false; 
	});
	$('#element4').focus(function() {
		teaserwrapper.cycle(0); 
	    	teaserwrapper.cycle('pause');
	    	return false; 
	});
	
});

function reidr(val) {

	if(val == "enterprise") {
	
		location.href="http://enterprise.dcalling.de/";
	
	}

}


