
//--defines the speed that the logo letters fade in and out--//
$logoFadeSpeed = 500;
//----------------------------------------------------------//
//--defines the speed that the logo letters bounce--//
$logoBounceSpeed = 500;
//----------------------------------------------------------//
//--defines the opacity of the letters when hovered over--//
$logoLetterOpacity = .4;
//----------------------------------------------------------//

$(document).ready(function(){
	$("#home").fadeTo(.0001, 0);
	$("#about").fadeTo(.0001, 0);
	$("#portfolio").fadeTo(.0001, 0);
	$("#contact").fadeTo(.0001, 0);
	$("#maintxtBlue").fadeTo(.0001, 0);
	$(".scroll").fadeTo(.0001, 0);
	$("#letter").fadeTo(.0001, 0, function(){
		$("#letter").fadeTo(2000 , 1);
	});
	$("#portfolioPage").fadeTo(.0001, 0, function(){
		$("#portfolioPage").fadeTo(2000 , 1);
	});
	
	
	$("#logoD").animate({top: '+=210'}, 1000).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed);
	$("#logoZ").animate({top: '+=410'}, 1050).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed);
	$("#logoI").animate({top: '+=610'}, 1100).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed);
	$("#logoN").animate({top: '+=810'}, 1150).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed);
	$("#logoE").animate({top: '+=1010'}, 1200).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed);
	$("#logoDit").animate({top: '+=1680'}, 1450).animate({top: '-=15'}, $logoBounceSpeed).animate({top: '+=5'}, $logoBounceSpeed, function(){
		$("#logoD").hover(function(){
		$("#logoZ,#logoI,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoZ,#logoI,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, 1);
			});	
		$("#logoZ").hover(function(){
		$("#logoD,#logoI,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoD,#logoI,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, 1);
			});	
		$("#logoI").hover(function(){
		$("#logoD,#logoZ,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoD,#logoZ,#logoN,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, 1);
			});
		$("#logoN").hover(function(){
		$("#logoD,#logoZ,#logoI,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoD,#logoZ,#logoI,#logoE,#logoDit").stop().fadeTo($logoFadeSpeed, 1);
			});
		$("#logoE").hover(function(){
		$("#logoD,#logoZ,#logoI,#logoN,#logoDit").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoD,#logoZ,#logoI,#logoN,#logoDit").stop().fadeTo($logoFadeSpeed, 1);
			});
		$(this).hover(function(){
		$("#logoD,#logoZ,#logoI,#logoN,#logoE").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoD,#logoZ,#logoI,#logoN,#logoE").stop().fadeTo($logoFadeSpeed, 1);
			});
		});
	
	$("#home").hover(function(){
		$(this).stop().fadeTo("slow", 1);
	},function(){
		$(this).stop().fadeTo("slow", 0);
	});
	
	$("#about").hover(function(){
		$(this).stop().fadeTo("slow", 1);
	},function(){
		$(this).stop().fadeTo("slow", 0);
	});
	
	$("#portfolio").hover(function(){
		$(this).stop().fadeTo("slow", 1);
	},function(){
		$(this).stop().fadeTo("slow", 0);
	});
	
	$("#contact").hover(function(){
		$(this).stop().fadeTo("slow", 1);
	},function(){
		$(this).stop().fadeTo("slow", 0);
		
	});
	
	$("#maintxtHover").hover(function(){
		$("#maintxtBlue").stop().fadeTo(400, 1);
		},function(){
		$("#maintxtBlue").stop().fadeTo(400, 0);
	});
	
//--defines the speed that the facebook and twitter link drop--//
dropSpeed = 500;
//------------------------------------------------------------//

	/*        FOOTER LINKS          */	
	$('#twitterLinkHolder').mouseover(function(){
		$('#twitterContainer').stop().animate({top: '-135'}, dropSpeed)
	});
	$('#twitterLinkHolder').mouseout(function(){
		$('#twitterContainer').stop().animate({top: '-160'}, dropSpeed)
	});
	
	$('#facebookLinkHolder').mouseover(function(){
		$('#facebookContainer').stop().animate({top: '-193'}, dropSpeed)
	});
	$('#facebookLinkHolder').mouseout(function(){
		$('#facebookContainer').stop().animate({top: '-218'}, dropSpeed)
	});
	$('#twitterLinkHolder').click(function(){
		window.location='http://www.twitter.com/JonGaulin';									   
	});
	$('#facebookLinkHolder').click(function(){
		window.location='http://www.facebook.com/pages/DZINEDIT/130219946997431?v=wall';									   
	});
	/*        FOOTER END          */	
	
	
	/*       CONTENT PAGES        */
	
	$("#logoDcontent").hover(function(){
		$("#logoZcontent,#logoIcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoZcontent,#logoIcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, 1);
			});	
		$("#logoZcontent").hover(function(){
		$("#logoDcontent,#logoIcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoDcontent,#logoIcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, 1);
			});	
		$("#logoIcontent").hover(function(){
		$("#logoDcontent,#logoZcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoDcontent,#logoZcontent,#logoNcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, 1);
			});
		$("#logoNcontent").hover(function(){
		$("#logoDcontent,#logoZcontent,#logoIcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoDcontent,#logoZcontent,#logoIcontent,#logoEcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, 1);
			});
		$("#logoEcontent").hover(function(){
		$("#logoDcontent,#logoZcontent,#logoIcontent,#logoNcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoDcontent,#logoZcontent,#logoIcontent,#logoNcontent,#logoDitcontent").stop().fadeTo($logoFadeSpeed, 1);
			});
		$("#logoDitcontent").hover(function(){
		$("#logoDcontent,#logoZcontent,#logoIcontent,#logoNcontent,#logoEcontent").stop().fadeTo($logoFadeSpeed, $logoLetterOpacity);
			},function(){
				$("#logoDcontent,#logoZcontent,#logoIcontent,#logoNcontent,#logoEcontent").stop().fadeTo($logoFadeSpeed, 1);
			});
		
		/*       CONTENT PAGES  END       */
		
		/*         PORTFOLIO PAGE         */
			
/*			function flipUp(site){
				$(site).stop().animate({top: '10'}, 300, function(){
					$(site).animate({top: '-200'}, 400, function(){
						$(site).animate({top: '-195'}, 200);
					});
				});
			};
			
			function flipDown(site2){
				$(site2).stop().animate({top: '-205'}, 300, function(){
					$(site2).animate({top: '10'}, 400, function(){
						$(site2).animate({top: '0'}, 200);
					});
				});
			};
		
		$('#siteThumbsBbq').hover(flipUp('#siteThumbsBbq'),flipDown('#siteThumbsBbq'));*/
		
		$('#siteThumbsBbq').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});
		});
		$('#siteThumbsCosy').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});			   
		});		
		$('#siteThumbsHelping').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsMonster').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsAtHomeMassage').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsDragonfly').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});			   
		});
		$('#siteThumbsTccaddy').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsScripture').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsMalaves').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		$('#siteThumbsShirtOFun').hover(function(){
			$(this).stop().animate({top: '10'}, 300, function(){
				$(this).animate({top: '-200'}, 400, function(){
					$(this).animate({top: '-195'}, 200);
				});
			});},function(){
				$(this).stop().animate({top: '-205'}, 300, function(){
					$(this).animate({top: '10'}, 400, function(){
						$(this).animate({top: '0'}, 200);
					});
			});				   
		});
		
		/*       CHECK YOUR CSS           */
		/*       END PORTFOLIO PAGE       */
});


