/*
 * Tooltip script 
 * powered by jQuery (http://www.jquery.com)
 * 
 * written by Alen Grakalic (http://cssglobe.com)
 * 
 * for more info visit http://cssglobe.com/post/1695/easiest-tooltip-and-image-preview-using-jquery
 *
 */
 


this.tooltip = function(){	
	/* CONFIG */		
		xOffset = 10;
		yOffset = 20;		
		// these 2 variable determine popup's distance from the cursor
		// you might want to adjust to get the right result		
	/* END CONFIG */		
	$("a.logoblockitem").hover(function(e){											  
		this.t = this.title;
		this.title = "";									  
		$("body").append("<p id='tooltip'>"+ this.t +"</p>");
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px")
			.fadeIn("fast");		
    },
	function(){
		this.title = this.t;		
		$("#tooltip").remove();
    });	
	$("a.logoblockitem").mousemove(function(e){
		$("#tooltip")
			.css("top",(e.pageY - xOffset) + "px")
			.css("left",(e.pageX + yOffset) + "px");
	});			
};






$(document).ready(function() {
						   
tooltip();

$('#slogan, #leistungen').hover(function() {
							 $(this).animate({marginLeft: "30px"}, 500);
							  }, function() {
							 $(this).animate({marginLeft: "17px"}, 500);
							  });


$('ul.showcase li a img, a.logoblockitem').hover(function() {
						$(this).animate({opacity: 0.7}, 300);
						}, function() {
						$(this).animate({opacity: 1}, 300);
						});

$('.pager').localScroll({
   target:'#showcasemask',
   axis:'y',
   duration: 1500

});


$('.pager').localScroll({
   target:'#projektmask',
   axis:'x',
   duration: 1500

});


$('ul.pager a:eq(0)').addClass("active");

$('ul.pager li a').click(function() {
						$('ul.pager li a').removeClass("active");
						$(this).addClass("active");
						});

	  
						  
$('#startheader').cycle({speed: 3000, timeout: 3000});



$('ul.start li a').not('a#ref').hide();
$('ul.start li').hover(function() {
							$(this).children('a').not('a#ref').fadeIn(300);
							$(this).animate({marginTop: "-5px"}, 300);							
							}, function() {
							$(this).animate({marginTop: "0px"}, 300);
							$(this).children('a').not('a#ref').fadeOut(300);
							});




});
