/**
 * @author Jon
 */

var HomePage = function () {
	var config = {
		IDs: {
			newsTabs: '#news',
			informationTabs: '#information',
			photoVideoArea: '#photo-video-extras',
			otherExtras: '#other-extras',
			searchBox: '#search-box'
		},
		values: {
			searchText: 'Search AA'
		}
	};
	var controls = {};
	
	
	return {
		init: function () {
			controls.newsTabs = $(config.IDs.newsTabs).tabs();
			controls.informationTabs = $(config.IDs.informationTabs).tabs();
			controls.photoVideoAccordian = $(config.IDs.photoVideoArea).accordion({
				event: 'mouseover',
				autoHeight: false
			});
			controls.otherExtraTabs = $(config.IDs.otherExtras).tabs();
			$(config.IDs.searchBox).focus(function () {
				var $this = $(this)
				if ( $this.attr('value') == config.values.searchText ) {
					$this.attr('value', '')
				}
			});
			$(config.IDs.searchBox).blur(function () {
				var $this = $(this)
				if ( $this.attr('value') == '' ) {
					$this.attr('value', config.values.searchText)
				}
			});
		}
	};
}();

$(document).ready(HomePage.init);
