// JavaScript Document

$(document).ready(function() {
		$(".topMenuAction").click( function() {
			if ($("#openCloseIdentifier").is(":hidden")) {
				$("#slider").animate({ 
					marginTop: "-274px"
					}, 500 );
				$("#topMenuImage").html('<img src="http://weboreviews.com/images/open.png" alt="open" />');
				$("#openCloseIdentifier").show();
			} else {
				$("#slider").animate({ 
					marginTop: "-160px"
					}, 500 );
				$("#topMenuImage").html('<img src="http://weboreviews.com/images/close.png" alt="close" />');
				$("#openCloseIdentifier").hide();
			}
		});  
		
		$("ul#menu span").css("opacity","0");
		// on mouse over
		$("ul#menu span").hover(function () {
			// animate opacity to full
			$(this).stop().animate({
				opacity: 1
			}, 'fast');
		},
		// on mouse out
		function () {
			// animate opacity to nill
			$(this).stop().animate({
				opacity: 0
			}, 'slow');
		});
		
		$(".social a").hover(function() {
			$(this).next("em").animate({opacity: "show", top: "95"}, "slow");
		}, function() {
			$(this).next("em").animate({opacity: "hide", top: "95"}, "slow");

		});
		$('#flinks a').hover(function() { //mouse in//
			$(this).animate({ paddingLeft: '+=20' }, 400);
				}, function() { //mouse out//
			$(this).animate({ paddingLeft: '-=20' }, 400);
		});
		$('#flinks2 a').hover(function() { //mouse in//
			$(this).animate({ paddingLeft: '+=20' }, 400);
				}, function() { //mouse out//
			$(this).animate({ paddingLeft: '-=20' }, 400);
		});
			//settings
				var opacity = 0.4, toOpacity = 1.0, duration = 400;
				//set opacity ASAP and events
				$('.opacity').css('opacity',opacity).hover(function() {
						$(this).fadeTo(duration,toOpacity);
					}, function() {
						$(this).fadeTo(duration,opacity);
					}
		);

	});

