$(document).ready(function () {
	$("#econtent").hide();
	$("#explore").click(function (event) {
		event.preventDefault();
		$("#econtent").slideToggle("slow");
	});
	$("#explore").infoTips();
	$("#search").betterSearch();
	$("#contact").ajaxEmail();
	$("#header #tabs a").hover(
		function(event) {
			$(this).animate({
				paddingBottom: "3px",
				marginTop: "-3px"
			}, 100);
		},
		function(event) {
			$(this).animate({
				paddingBottom: "0px",
				marginTop: "0px"
			}, 100);
		}	
	);
	// Fade effects
	
/*	$("#post-451 h2").hover(
		function(event) {$(this).fadeTo(300, 1);},
		function(event) {$(this).fadeTo(300, .6);}
	);*/
	
	$(".salem h1 a").hover(
      function () {
	//	$(".salem h1").prepend("<span style='display: none;'>Interested? Let's talk.</span>");
        $(this).fadeTo("normal", 0.2);
//		$(".salem h1 span").fadeIn();
      }, 
      function () {
        $(this).fadeTo("normal", 1);
//		$(".salem h1 span").remove();
      }
    );
	
	$("#subscribe a").hover(
		function(event) {$(this).fadeTo(200, 1);},
		function(event) {$(this).fadeTo(200, .7);}
	);	
	$("#lifestream").append('<p class="loading">Loading lifestream...</p>').fadeIn("slow");
}); 
$(window).load(function () {
	$.ajax({
		url: "/wp-content/themes/overview/mlife.php", ///wp-content/themes/overview/
		cache: false,
		beforeSend: function() {
			
		},
		success: function(data){
			$("#lifestream").append(data).find("#loadlife").hide();
			$("#lifestream .loading").slideUp("normal");
			
			$("#lifestream #loadlife").animate({
				height: "toggle", 
				opacity: "toggle"
			}, 2000); 
			$(".serviceicon a").infoTips();
		}
	});	
}); 