	$.noConflict();
	jQuery(document).ready(function($){
		
		
		var maxHeight = 426;	
		var heightClose = 400;
		var toCopyHeight = 34;		
		var elementWidht = 213;
		
		
		/* flow */
			
			$('#sInfoCopyHolder').css({height:'112px', overflow: 'hidden'});
			var flowElements = parseInt($('#sInfoCopy').width() / 213);
				
				if(flowElements > 1){
					var toCopyHeight = 54;
					var addhtml = "";
					for(var i=1; i <=flowElements; i++){
						addhtml += '<li><a href="">&nbsp;</a></li>';
					}			
					
					$('#sInfoButtons').html(addhtml);
					$('#sInfoButtons').find('a:first').addClass('active');
					
					
					
					$('#sInfoButtons a').click(function(event){
						event.preventDefault();	
						if(!$(this).hasClass('active')){
							
							//scroll
							var scrollto = parseInt($('#sInfoButtons a').index($(this)) * elementWidht * -1);
							//_log(scrollto);
							//$('#sInfoCopy').scrollLeft(scrollto);
							
							$('#sInfoCopy').animate(
								{left: scrollto }, 
								1000,
								'easeOutExpo');
							
							$('#sInfoButtons a').removeClass('active');
							$(this).addClass('active')
						}
					});					
					$('#sInfoButtons').show();
				}
		
	
		
		/* calculate height*/		
		
		if($('#sInfoCopy').length > 0){
			
			var copyHeight = ($('#sInfoCopy').height() + toCopyHeight);
			var moveOpenTo = (maxHeight-copyHeight);
			
			
			if($('#subnavi_Unternehmen ul li:first').hasClass('activ') || $('#subnavi_Company ul li:first').hasClass('activ')){
				//set it to open
				$('#sInfoContent').height(copyHeight);	
				$('#sInfoContent').css({top: moveOpenTo});	
			}else{
				//set it to close
				$('#sInfoContent').height(copyHeight);	
				$('#sInfoContent').css({top: heightClose});	
			}
			
			
			
			//set the click
			$('#sInfoContent h1').click(function(event){
				event.preventDefault();	
				
				if(parseInt($('#sInfoContent').css('top')) < 400){
					//is open
					$('h1', this).addClass('close');
					$('#sInfoContent').animate(
								{top: heightClose }, 
								1000,
								'easeOutExpo');
				}else{
					//is close	
					$('h1', this).removeClass('close');
					$('#sInfoContent').animate(
								{top: moveOpenTo }, 
								1000,
								'easeOutExpo');
				}					
			});
			
		}							 
	});
							
														
	
	function _log(value){	
		if (window.console != undefined) {
			console.log(value);	
		}else{
			alert(value);	
		}
		
	};
