$(document).ready(function(){

	var fadeFeatured = false;

	if(ie_detected == false){
	
		// Zoom the container button
		$('.button-container img.button-image').css('width', '177px');
		$('.button-container img.button-image').show();
		$('.button-container img.button-image').animate({
			opacity: 1,
			width: '197px',
			top: '0',
			left: '0',
		}, 250, function(){
	
			// Rotate the social media element
			$('.button-container .button-socialmedia').rotate({
				duration:500,
				angle: -100, 
				animateTo:0,
			});
	
			// Show the social media element
			$('.button-container .button-socialmedia').show();
			$('.button-container .button-socialmedia').animate({
				opacity: 1,
			}, 500, function(){
	
				// Show featured items gradually
				if(fadeFeatured){
					var delayShow = 0;
					var delayStep = 200;
					$('.featured-container .featured-item').each(function(){
						delayShow = delayShow+delayStep;
						$(this).delay(delayShow).fadeIn(200);
					});
				}
			});
		});
	
	} else {
		// Set frameborder to 0
		$('.like iframe').attr('frameborder', 0);
	}

	// Slide banner images
	$('.featured-container .multiple-images .slider').cycle({
		fx: 'scrollLeft',
	});
	
	// Contactform validation
	$('#contact_form').validate();
	$('#donation_payment_form').validate();
	
});


