
Event.addBehavior({
	
	/* Our Homepage Features Drawers
	-----------------------------------------------------*/
	'ul#features' : function() {
		var container = this;
    var accordion = new UXB.Accordion(container, {firstOpenSection: '-1'});
		var d = 0;
		$$('#' + accordion.container.id + ' li.section').each(function(li) {
			var contentElement = li.down('div.body');
			var handle = li.down('a.handle');
			var section = new UXB.Section(contentElement, handle, accordion, {sectionCount: d});
			accordion.addSection(section);
			d++;
		});
  },
	
	/* Monthly Poll Form
	-----------------------------------------------------*/
	'form#form_monthly_poll' : UXB.AJAXPoll(),
	
	/* Newsletter Sign Up Links
	-----------------------------------------------------*/
	'a.btn_sign_up' : UXB.Popup({'width':'285', 'height':'580'}),
	
	/* Media Player Links
	-----------------------------------------------------*/
	'a.btn_media_player' : UXB.Popup({'width':'700', 'height':'550'}),
	
	/* Online Store
	-----------------------------------------------------*/
	'a#btn_whats_this' : UXB.Popup({'width':'600', 'height':'440'}),
	'a#btn_forgotpass:click' : function() {
		$('password_form').toggle();
		$('login_form').toggle();
		return false;
	},
	'a#btn_forgotpass_cancel:click' : function() {
		$('password_form').toggle();
		$('login_form').toggle();
		return false;
	},
	
	/* Form Validator
	-----------------------------------------------------*/
	'form.validate' : UXB.Validator({'highlightColor':'#831b1e'}),
	
	/* Search Form
	-----------------------------------------------------*/
	'#search_box:focus' : function() {
		if(this.value == 'SEARCH') {
			this.value = '';
		}
	},
	'#search_box:blur' : function() {
		if(this.value == '') {
			this.value = 'SEARCH';
		}
	},
	
	/* Print Page Links
	-----------------------------------------------------*/
	'a#printPage:click' : function(event) {
		Event.stop(event);
		print();
	},
	
	/* Links to be opened in a new window
	-----------------------------------------------------*/
	'a.new_window': function() {
		this.target = "_blank";
	}
	
});

