$(document).ready(function(){

	$(document).ready(function(){
		$("#signup").click(function() {
	    	$.get("/helix-function/ajaxian-stuff.php", { email: $("#email").val(), action: 'newsletter' },
			function(data){
				$("#returner").html(data); 
			});
		});
	});
	
	
				
    	    		$(document).ready(function() {
			            $('#area-459').keyup(function() {
            	    		var len = this.value.length;
        			        if (len >= 200) {
		            	        this.value = this.value.substring(0, 200);
                			}
	        		        $('#charLeft-459').text(200 - len);
			            });
        			});
		    		$('.nav-text').each(function() {
    var default_value = this.value;
    $(this).focus(function() {
        if(this.value == default_value) {
            this.value = '';
        }
    });
    $(this).blur(function() {
        if(this.value == '') {
            this.value = default_value;
        }
    });
});


   $("#submitcomment").click(function(){
   		var commentfname = encodeURI(document.getElementById('comment-fname').value);
        var jason = encodeURI(document.getElementById('commentvalue').value);
   		var pid = document.getElementById('commentvalue_pid').value;
   		
   		document.getElementById("commentreturn").innerHTML="<img src=\"/helix/images/ajax-loader.gif\">";
     $("#commentreturn").load("/helix-function/ajaxian-stuff.php?action=comment&value="+jason+"&fname="+commentfname+"pid="+pid);
   });
	$('#s3capcha').s3Capcha();
 });
