$(document).ready(function() { 
	$('#access a').hover(function(){
									 $(this).parent().addClass("hover");
									 $(this).addClass("hover");
								  },
								  function(){
									 $(this).parent().removeClass("hover"); 
									 $(this).removeClass("hover"); 
});
	
	/* External links Start */
$('.menu-header li:last a').attr('target','_blank');
/* External links End */

/*
$('#access a[href][title]').qtip({
      content: {
		  
         text: false // Use each elements title attribute
      },
      //style: 'cream' // Give it some style
   });

*/


/**/
(function(jQuery) {
jQuery.fn.fadeInSequence = function(fadeInTime, timeBetween)
{
	//Default Values
	timeBetween = typeof(timeBetween) == 'undefined' ? 0 : timeBetween;
	 fadeInTime = typeof(fadeInTime) == 'undefined' ? 500 : fadeInTime;

	//The amount of remaining time until the animation is complete.
	//Initially set to the value of the entire animation duration.
	var remainingTime = jQuery(this).size() * (fadeInTime+timeBetween);

	var i=0; //Counter
	return jQuery(this).each(function()
	{
		//Wait until previous element has finished fading and timeBetween has elapsed
		jQuery(this).delay(i++*(fadeInTime+timeBetween));

		//Decrement remainingTime
		remainingTime -= (fadeInTime+timeBetween);

		if(jQuery(this).css('display') == 'none')
		{
			jQuery(this).fadeIn(fadeInTime);
		}
		else //If hidden by other means such as opacity: 0
		{
			jQuery(this).animate({'opacity' : 1}, fadeInTime);
		}

		//Delay until the animation is over to fill up the queue.
		jQuery(this).delay(remainingTime+timeBetween);

	});	

};

})(jQuery);

$("#btns").children().hide().fadeInSequence(900);
/**/
});
/*End Doc Ready*/

/*CUFON*/
Cufon.replace('.menu, #primary .page_item a',{
			  fontFamily: 'Mittel',
			  hover: true
});

Cufon.replace('h1,h2,h3,h4,h5,h6,.panel,.engschrift',{
			  fontFamily: 'Eng',
			  hover: true
});

Cufon.replace('#content h1, #content h2, #content h3, #content h4, #content h5, #content h6, .read-more',{
			  fontFamily: 'Eng',
			  textShadow: '#fff 0 1px',
			  hover: true
});

Cufon.now();


