// Page Peel Effect for Ad on Homepage
$(document).ready(function(){
if ( userHasFlash ) {} else {
	$("#pageflip").hover(function() {
		$("#pageflip .curl, #pageflip .msg_block, #pageflip").stop()
			.animate({
				width: '700px', 
				height: '700px'
			}, 350); //Grow the page curl and the advertisement container 
		} , function() {
		$("#pageflip .curl, #pageflip .msg_block, #pageflip").stop() 
			.animate({
				width: '75px', 
				height: '75px'
			}, 220); //shrink the curl and advertisement container
	});
	
	//hide the preview on mouse over to show the full ad container
	$("#pageflip, #sub-pageflip").mouseover(function() {
		$('.msg_block_preview').toggleClass('hiddenClass');
	});
	
	//bring the preview back after the page curl comes back
	$("#pageflip, #sub-pageflip").mouseout(function() {
		setTimeout(function(){
    		$('.msg_block_preview').toggleClass('hiddenClass');
		}, 230);
	});

		
		
	/* function for 300 x 300*/
	$("#sub-pageflip").hover(function() {
		$("#sub-pageflip .curl, #sub-pageflip .msg_block, #sub-pageflip").stop()
			.animate({
				width: '300px', 
				height: '300px'
			}, 350); 
		} , function() {
		$("#sub-pageflip .curl").stop() 
			.animate({
				width: '75px', 
				height: '75px'
			}, 220);
		$("#sub-pageflip, #sub-pageflip .msg_block").stop() 
			.animate({
				width: '75px', 
				height: '75px'
			}, 200);
	});
}
});
