/**
 * @author Jon
 */

var BlogPage = function () {
	var config = {
		IDs: {
			newsLetterLink: '#newsletter-link'
		},
		selectors: {
			notices: '.notice',
			popups: '.popup'
		},
		values: {
			noticeTimeout: 3000
		}
	};
	var controls = {};
	
	return {
		init: function () {
			setTimeout(function(){ $(config.selectors.notices).slideUp() }, config.values.noticeTimeout);
			$(config.selectors.popups).bind('click', function (event) {
				event.preventDefault();
				var target = $(event.target);
				window.open(target.attr('href'), 'popup','height=300,width=970');
			});
			
			//evenFeatures();
			$(config.IDs.newsLetterLink).bind('click', function(e) {
				$('#newsletter-panel').effect('highlight', {speed: 'slow'});
			});
			
			if(window.location.hash == '#newsletter') {
				$('#newsletter-panel').effect('highlight', {speed: 'slow'});
			}
		}
	};
}();

$(BlogPage.init);
