
//color changing buttons

$("#colormodes").hover(
	function() {
		$("#colormodes").stop().animate({"opacity": "1"}, "slow");
	},
	function() {
		$("#colormodes").stop().animate({"opacity": ".3"}, "slow");
	});

				  
				  
				  
$("#black").click(function() {
					
					$("#body").css('background-color',"#000");
					$("#body").css('color',"#EEE");
					$("#bigbutton").css('background-color',"#000");
					$("#bigbutton").css('color',"#EEE");
					$("#bigbutton").animate({ opacity: .9 }, 500);
					$("#caption").css('color',"#EEE");
					
});
$("#white").click(function() {
					
					$("#body").css('background-color',"#FFF");
					$("#body").css('color',"#444");
					$("#bigbutton").css('background-color',"#FFF");
					$("#bigbutton").css('color',"#444");
					$("#bigbutton").animate({ opacity: .95 }, 500);
					$("#caption").css('color',"#444");
					
});			



//comment form


function callPHP(params) {
    var httpc = new XMLHttpRequest(); // simplified for clarity
    var url = "send_comment.php";
    httpc.open("POST", url, true); // sending as POST

    httpc.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    httpc.setRequestHeader("Content-Length", params.length); // POST request MUST have a Content-Length header (as per HTTP/1.1)

    httpc.onreadystatechange = function() { //Call a function when the state changes.
    if(httpc.readyState == 4 && httpc.status == 200) { // complete and no errors
        
		
		alert(httpc.responseText); // some processing here, or whatever you want to do with the response
        }
    }
    httpc.send(params);
}


	
