$("document").ready(function(){ $(".hidden-content").hide(0);});

jQuery.fn.toggleText = function(a,b) {
        return this.html(this.html().replace(new RegExp("("+a+"|"+b
+")"),function(x){return(x==a)?b:a;}));

}

$("document").ready(function(){ $(".rollcontent").hide(0);});

jQuery.fn.toggleText = function(a,b) {
        return this.html(this.html().replace(new RegExp("("+a+"|"+b
+")"),function(x){return(x==a)?b:a;}));

}



$(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1500);
                return false;
            }
        }
    });
});



$(function() { $("a.mywork").click(function(){ 
												

	
	$("a#mw").toggleText('more of my work','yick, hide this stuff');	
	
	$("#myworkcontent").toggle("normal");

 


	
	})
});

$(function() { $("a.aboutme").click(function(){ 
												

		
	
	$("#aboutme").toggle("normal");

 


	
	})
});




$(function() { $("a.backtotop").click(function(){ 
											   
											  
 $(".hidden-content").slideUp("normal");
 $("a#mw").html('more of my work');	
 

	
	
	})
});



$(function() { $("div.hoverwork").mouseenter(function() {
									   
   $(this).children().slideDown("normal");
  
   
  }).mouseleave(function() {
	  
    $(this).children().slideUp("normal");
  
  })

});


/* This clears temporary copy in a search box when user enters the box */
function clearIt(what) {
    what.value = '';
}




