window.addEvent('domready', function(){
	var tearFx = new Fx.Tween('tear_holder', {link:'chain', duration: 1000, transition:'bounce:out'});
	$('tear').addEvent('click', function(event){
		tearFx.start('top','40px');
		tearFx.start('top','-30px');
	});
	
	$$('a.star').addEvent('click', function(e) {
		var e = new Event(e);
		var theText = e.target.getText();
		theText = theText * 1;
		//alert(theText);
		var e = new Event(e).stop();
		var url = "response_star.php";
 
	 	/*
		new Ajax(url, {
			method: 'get',
			update: $('star_rater'),
			onComplete: function() {
				$('star_rater').removeClass('star-rating');
				$('star_rater').removeClass('small-star');
			}
		}).request( Object.toQueryString({rating: theText}) );
		*/
	
	});
	
	if(Browser.Engine.trident4) {
		var ieError = new Element('div', { 'class' : 'message error', 'style' : 'margin: 0;',
			'html':
			'<h4>Please consider upgrading your browser.</h4><div style="float: left; text-align: left; padding: 10px; width:500px;">' + 
			'We have detected that you are using Internet Explorer 6, ' + 
			'which was released <strong>way back in 2001</strong> and was not designed with the standards of today in mind. ' + 
			'With this in mind you can probably see from looking at the site below, we have decided to disregard IE6 compatibility.</div>' + 
			'<div style="float: right; text-align: right; padding-right: 10px; width:300px;">' +
			'<h4>For Your Consideration: </h4>'+
			'We would recomend at least <a href="http://www.microsoft.com/windows/downloads/ie/">upgrading to IE7.</a><br /> Although, <i>some better options</i> are: <br /><br />' +
			'<a href="http://www.opera.com/download/" title="Download Opera" ><img src="http://promote.opera.com/small/opera88x31.gif" width="88" height="31" alt="Opera Web Browser" /></a>&nbsp;&nbsp;&nbsp;' +
			'<a href="http://www.spreadfirefox.com/node&id=0&t=314"><img border="0" alt="Firefox 3" title="Firefox 3" src="http://sfx-images.mozilla.org/affiliates/Buttons/firefox3/FF3_88x31_b.png"/></a>' +
			'</div><br clear="all">&nbsp;'
		});
		ieError.inject(document.body, 'top');
	}
	
	if( $chk($('comments')) ) {
		$('comments').addEvent('submit', function(event){
			if( $('comment_name').get('value') == 'Name' ) $('comment_name').set('value','');
			if( $('comment').getText() == 'Comment' ) $('comment').set('value','');
		});
		
	}
	
	if( $chk($('comment')) ) {
		$('comment').addEvent('focus', function(event){
			if( $('comment').get('value') == 'Comment' ) $('comment').set('value','');
		});
	}
	
	if( $chk($('comment_name')) ) {
		$('comment_name').addEvent('focus', function(event){
			if( $('comment_name').get('value') == 'Name' ) $('comment_name').set('value','');
		});
	}
	
	$('header').setOpacity(.99); //fixes some funky rendering problems in FF mac, maybe drop this line
	
//	$$('body').setStyle('-webkit-transform','rotate(180deg)');
	
});