/*----------------------------------------------------------------------------------------*/
function selectPage(num, season){
		if (season == undefined)
			season = ''
		new Ajax.Updater($$('.tab_content')[0], "/jobs/" + season, {method:'get', parameters : {page: num}});
}

document.observe('dom:loaded', function(){
	if ($('show_more')) {
		new ShowMore($('show_more'), "More information", "Less information");
	}
	
	if ($('job_listing')) {
		new Tabs($('job_listing'), $$('.togglers li'), $$('.tab_content'), 0);
	}

	if ($$('.tab1')) {
		$$('.tab1')[0].addClassName('active');

		// All Jobs
		$$('.tab1')[0].observe('click', function() {
		  new Ajax.Updater($$('.tab_content')[0], '/jobs/');
		});

		// Summer Jobs
		$$('.tab2')[0].observe('click', function() {
		  new Ajax.Updater($$('.tab_content')[0], '/jobs/summer/');
		});

		// Year-round Jobs
		$$('.tab3')[0].observe('click', function() {
		  new Ajax.Updater($$('.tab_content')[0], '/jobs/year-round/');
		});
	}
});
