jQuery(document).ready(function($) {

	$("#colsThree ul>li").hover(function(){  
	 $(this).css("background-color","#e7e0cd");
	 $(this).css("cursor","pointer");
	 $(".avatar img", this).css("width","100px");
	 $(".avatar img", this).css("margin-left","-25px");
	 
	 },function(){  

	 $(this).css("background-color","#f1ede2");
	 $(this).css("cursor","none");
	 $(".avatar img", this).css("width","72px");
	 $(".avatar img", this).css("margin-left","0px");
	 }); 
	
	 $("#colsThreeExpanded ul>li").hover(function(){  
	 $(this).css("background-color","#e7e0cd");
	 $(this).css("cursor","pointer");
	 $(".avatar img", this).css("width","100px");
	 $(".avatar img", this).css("margin-left","-25px");
	 
	 },function(){  

	 $(this).css("background-color","#f1ede2");
	 $(this).css("cursor","none");
	 $(".avatar img", this).css("width","72px");
	 $(".avatar img", this).css("margin-left","0px");
	 }); 

	 $("#colsOne ul>li").hover(function(){  
	 $(this).css("background-color","#e7e0cd");
	 $(this).css("cursor","pointer");
	 $(".avatar img", this).css("width","100px");
	 $(".avatar img", this).css("margin-left","-25px");
	 
	 },function(){  

	 $(this).css("background-color","#f1ede2");
	 $(this).css("cursor","none");
	 $(".avatar img", this).css("width","72px");
	 $(".avatar img", this).css("margin-left","0px");
	 }); 

	$("#featuredStoriesCol ul>li").hover(function(){  
	 $(this).css("background-color","#e7e0cd");
	 $(this).css("cursor","pointer");
	 $(".avatar img", this).css("width","100px");
	 $(".avatar img", this).css("margin-left","-25px");
	 
	 },function(){  

	 $(this).css("background-color","#ded6ba");
	 $(this).css("cursor","none");
	 $(".avatar img", this).css("width","72px");
	 $(".avatar img", this).css("margin-left","0px");
	 }); 


	 $("#profileUpdate").hide();
	 $("#photoUpdate").hide();
	 $("#commentBox").hide();

	 $("a#updatePhotoLink").click(function(){   
	 $("#photoUpdate").fadeIn("show"); 
	 });  

	 $("div#photoUpdateclosebutton").click(function(){  
	 $("#photoUpdate").fadeOut("show"); 
	 });  
	 
	 $("div#updateProfileLink").click(function(){  
	 $("#profileUpdate").fadeIn("show");  
	 });  

	 $("#profileUpdateclosebutton").click(function(){  
	 $("#profileUpdate").fadeOut("show"); 
	 });		
	 
 
	 $("div#emailStorytellerLink").click(function(){  
	 $("#commentBox").slideDown("show"); 
	 });  

	 $("#commentBoxclosebutton").click(function(){  
	 $("#commentBox").slideUp("show"); 
	 });	
	
	 
	 
	

				
});


function autosave(storyID) 
{ 
    var t = setTimeout("autosave()", 50000); 
 
    var oneWord = $("#oneWord").val(); 
    var content = $("#storyText").val(); 
 
    if (oneWord.length > 0 || content.length > 0) 
    { 
        $.ajax( 
        { 
            type: "POST", 
            url: "http://02d89fb.netsolhost.com/blumailstories/index.php/myaccount/autosave", 
            data: "storyID=" + storyID + "&oneWord=" + oneWord + "&storyText=" + content, 
            cache: false, 
            success: function(message) 
            { 
                $("#timestamp").empty().append(message); 
            } 
        }); 
    } 
}
