$(function(){
	Website.init();
});

var Website = {
	init: function(){
		this.makeSubmit();
		this.dayView();
		if($('#js-news').length > 0) this.makeTicker();
	}, 
	
	makeTicker: function(){
		$('#js-news').ticker({
			debugMode: false, 
			titleText: 'Related News |'
		});
	},
	
	makeSubmit: function(){
		$('a.submitForm').click(function(){
			$(this).parents().filter("form").trigger("submit");
			return false;
		});
	}, 
	
	dayView: function(){
		$("a[rel='day_view']").colorbox({
			width:"480px", 
			height:"450px", 
			current: "",
			iframe: true
		});	
	}
};
