$(document).ready(function() {

        $('#welcome').hide().fadeIn(800);
        $('#weitere-referenzen').hide().fadeIn(2600);
        $('#social').delay(3000).hide().fadeIn(1200);
        
	$('#more-wd, #more-gd, #more-fd, #more-twitter, #more-blog')
	.mouseenter(function() {
	  $(this).animate({ paddingLeft: 45 }, 300, "easeOutExpo");
	})
	.mouseleave(function() {
	  $(this).animate({ paddingLeft: 30 }, 200, "easeOutExpo");
	})

	
	$("a.popfancy").fancybox({
		'hideOnContentClick': true,
		'hideOnOverlayClick': true,
		'overlayShow': true,
		'showCloseButton': false,
		'padding': 1,
		'overlayOpacity': 0.6,
    'transitionIn'  : 'elastic',
    'transitionOut'	: 'elastic',
    'easingIn'      : 'easeOutBack',
    'easingOut'     : 'easeInBack',
		'overlayColor': '#000',
    'titlePosition': 'over',
		'speedIn'		:	500,
    'speedOut'	:	300,
    'onComplete'	:	function() {
    		$("#fancybox-wrap").hover(function() {
    			$("#fancybox-title").show();
    		}, function() {
    			$("#fancybox-title").hide();
    		});
    	}
	});
	
  $('#morebox').hide();
    
  $('#morebox-down').click(function() {
    $('#morebox').slideDown('slow');
    return false;
  });
  $('#morebox-up').click(function() {
    $('#morebox').slideUp('fast');
    return false;
  });
  $('#morebox-slidetoggle').click(function() {
    $('#morebox').slideToggle(400);
    return false;
  });
  
  $('#morebox2').hide();
    
  $('#morebox2-down').click(function() {
    $('#morebox2').slideDown('slow');
    return false;
  });
  $('#morebox2-up').click(function() {
    $('#morebox2').slideUp('fast');
    return false;
  });
  $('#morebox2-slidetoggle').click(function() {
    $('#morebox2').slideToggle(400);
    return false;
  });

  $("a.mapslink").fancybox({
		'width'				: '60%',
		'height'			: '80%',
    'autoScale'     	: false,
		'speedIn'		:	300,
		'hideOnContentClick': true,
		'hideOnOverlayClick': true,
		'overlayShow': true,
		'showCloseButton': false,
		'padding': 0,
		'overlayOpacity': 0.6,
    'transitionIn'		: 'none',
		'transitionOut'		: 'none',
		'overlayColor': '#000',
    'titleShow': false, 
		'speedOut'		:	150,
		'type'				: 'iframe'
  });
  
  $(".notonline-link").fancybox({
		'hideOnOverlayClick': true,
		'showCloseButton': false,
		'padding': 50,
		'overlayOpacity': 0.6,
		'overlayColor': '#000',
    'titlePosition': 'over'
	});
	
				$("#twitter").getTwitter({
					userName: "ristaumedia",
					numTweets: 5,
					loaderText: "Lade tweets...",
					slideIn: false,
					slideDuration: 750,
					showHeading: false,
					headingText: "Letzte Tweets",
					showProfileLink: false,
					showTimestamp: true
				});

});
