var once = true;

$(document).ready(function(){
    /*   checks to see whether there is an text in textarea  */
    $textarea = $("textarea");
    if (!$textarea.length > 0) {
        return;
    }
    if($textarea.val().match(/^\s*$/) != null) {
        /*  If not then adds the text and style */
        $textarea.text("Type your story here").addClass("defaultText").focus(function () { 
            /* when textarea is clicked on this removes text and style */
            if(once){
                $(this).text("");
                $("textarea").removeClass("defaultText");
                once = false;
            }
        });
    }
});
