$(document).ready(function()
{
	p2l = "40px";
	p2r = "480px";
	
	p3l = "85px";
	p3r = "525px";
	
	p4l = "130px";
	p4r = "570px";
	
	speed = 300;
	
	$('#top-story .p1').mouseover( function(){
		$('#top-story .p2').stop().animate({left:p2r},speed);
		$('#top-story .p3').stop().animate({left:p3r},speed);
		$('#top-story .p4').stop().animate({left:p4r},speed);
	});
	
	$('#top-story .p2').mouseover( function(){
		$('#top-story .p2').stop().animate({left:p2l},speed);
		$('#top-story .p3').stop().animate({left:p3r},speed);
		$('#top-story .p4').stop().animate({left:p4r},speed);
	});
	
	$('#top-story .p3').mouseover( function(){
		$('#top-story .p2').stop().animate({left:p2l},speed);
		$('#top-story .p3').stop().animate({left:p3l},speed);
		$('#top-story .p4').stop().animate({left:p4r},speed);
	});
	
	$('#top-story .p4').mouseover( function(){
		$('#top-story .p2').stop().animate({left:p2l},speed);
		$('#top-story .p3').stop().animate({left:p3l},speed);
		$('#top-story .p4').stop().animate({left:p4l},speed);
	});
	



	/* PLACEHOLDERS */
	$('input.submittable').each( function(){
		if( $(this).attr('placeholder') != undefined )
		{
			$(this).val( $(this).attr('placeholder') );
			$(this).css( 'color','#cccccc' );
			$(this).focus( function(){
				$(this).css( 'color','#666666' );
				$(this).val('')
			});
		}
	});
	
	
	
	
	/* CORNERS (only if not on FAQ-page)*/
	setTimeout("RoundCorners()",500);
	
	
	
	
	/* FAQ */
	$('.faq').toggle( function(){
		$(this).children('p').slideDown('fast');
	},
	function(){
		$(this).children('p').slideUp('fast');
	});
	$('#faq-expand-all').click( function(){
		$('.faq').children('p').slideDown();
	});
});



function RoundCorners()
{
	$('#top-story').corner(              { tl:{radius:5}, tr:{radius:5}, bl:{radius:5}, br:{radius:5}, antiAlias:true });
	$('.content-box').corner(            { tl:{radius:5}, tr:{radius:5}, bl:{radius:5}, br:{radius:5}, antiAlias:true }); 
	$('.spotlight-top').corner(          { tl:{radius:3}, tr:{radius:3}, bl:{radius:0}, br:{radius:0}, antiAlias:true });
	$('.spotlight-bottom').corner(       { tl:{radius:0}, tr:{radius:0}, bl:{radius:3}, br:{radius:3}, antiAlias:true });
	$('.rounded-corners-top').corner(    { tl:{radius:5}, tr:{radius:5}, bl:{radius:0}, br:{radius:0}, antiAlias:true });
	if( document.title.substring(0,3) != "FAQ" )
	{
		$('.rounded-corners-bottom').corner( { tl:{radius:0}, tr:{radius:0}, bl:{radius:5}, br:{radius:5}, antiAlias:true });
	}

}
