function bounceLift() {
		
	$('#trialBadge').queue('bounceLift', function(next) {
		
		$('#trialBadge a').stop(true, false).animate({
			'top' : '0px'
		},
		{
			duration: 250,
			complete: function() {
				next();
			}
		});
		
	});
		
	$('#trialBadge').queue('shadowLift', function(next) {
		
		$('#trialBadge .shadow').stop(true, false).animate({
			'opacity' : '0.4'
		},
		{
			duration: 250,
			complete: function() {
				next();
			}
		});
		
	});
		
	$('#trialBadge').dequeue('bounceLift');
	$('#trialBadge').dequeue('shadowLift');
	
};
	
function bounceDrop() {
		
	$('#trialBadge').queue('bounceDrop', function(next) {
	
		$('#trialBadge a').stop(true, false).animate({
			'top' : '10px'
		},
		{
			duration: 500,
			easing: 'easeOutBounce',
			complete: function() {
				next();
			}
		});
	
	});
	
	$('#trialBadge').queue('shadowDrop', function(next) {
	
		$('#trialBadge .shadow').stop(true, false).animate({
			'opacity' : '1'
		},
		{
			duration: 500,
			easing: 'easeOutBounce',
			complete: function() {
				next();
			}
		});
	
	});
		
	$('#trialBadge').dequeue('bounceDrop');
	$('#trialBadge').dequeue('shadowDrop');
	
};

$(document).ready(function(e) {

	$('#trialBadge a').hover(
	function() {
		bounceLift();
	},
	function() {
		bounceDrop();
	});
	
	//
	
	$('.backtotop').click(function() {
		
		$('html, body').animate({
			scrollTop : 0
		},
		{
			duration: 1000,
			easing: 'easeOutQuart'
		});
		
		return false;
	
	});
	
	//
	
	var x = $('#sitemap .directory .column').length;
	var y = $('#sitemap .directory').width();
	
	var z = 0;
	$('#sitemap .directory .column')
	.each(function(index, element) {
		z = ( z + $(this).outerWidth(true) );
	})
	.not(':first')
	.css({
		'margin-left' : ( Math.floor( ( y - z ) / ( x - 1 ) ) ) + 'px'
	});
	
	//
	
	$('#ozpital a').css({
		'opacity' : '0.2'
	});
	
	$('#ozpital a').mouseenter(function() {
		
		$('#ozpital').queue('ozpital', function(next) {
	
			$(this).find('a').stop(true, false).animate({
				'opacity' : '1'
			},
			{
				duration: 1000,
				complete: function() {
					next();
				}
			});
		
		});
		
		$('#ozpital').dequeue('ozpital');
	
	});
	
	$('#ozpital a').mouseleave(function() {
	
		$('#ozpital').queue('ozpital', function(next) {
	
			$(this).find('a').stop(true, false).animate({
				'opacity' : '0.2'
			},
			{
				duration: 1000,
				complete: function() {
					next();
				}
			});
		
		});
		
		$('#ozpital').dequeue('ozpital');
	
	});
	
});
