function public_setup() {
	// set focus on first input field for sign up form
	$('#signup input[type=text]:first, #certification.application input[type=text]:first').focus();
	
	
	/*
	 * post position internship toggle
	 */
	
	// hide approved on load
	var approved = $('#careers.post .form select#approved').closest('tr.formitem');
	$(approved).hide();
	
	// display approved on type toggle
	$('#careers.post .form input[name=type]').click(function() {
		if($(this).val() == 1) {
			$(approved).hide();
		} else {
			$(approved).show();
		}
	});
	
	
	// default pagination
	$('table.data.paginate').each(function() {
		var id = $(this).attr('id');
		
		switch(id) {
			case 'directory':
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'aoColumns': [ 
						{ 'sType': 'html' },
						null,
						null,
						null
					],
					'aaSorting': [[0,'asc']],
					'asStripClasses': [ 'odd', 'even' ]
				});

				break;
				
			case 'mentors':
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'aoColumns': [ 
						{ 'sType': 'html' },
						null,
						null
					],
					'aaSorting': [[0,'asc']],
					'asStripClasses': [ 'odd', 'even' ]
				});

				break;
				
			case 'news':		
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'aaSorting': [[0,'desc']],
					'asStripClasses': [ 'odd', 'even' ]
				});

				break;
				
			case 'clinics':				
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'aaSorting': [[0,'asc']],
					'asStripClasses': [ 'odd', 'even' ]
				});

				break;
				
			case 'articles':
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'aoColumns': [ 
						{ 'sType': 'html' },
						null,
						null
					],
					'asStripClasses': [ 'odd', 'even' ]
				});

				break;
				
			default:
				$(this).dataTable({
					'bStateSave': true,
					'bAutoWidth': false,
					'iDisplayLength': 25,
					'sPaginationType': 'full_numbers',
					'sDom': '<"dataTables_header"lfr>t<"dataTables_footer"ip>',
					'oLanguage': { 
						'sInfo': 'Showing _START_ to _END_ of _TOTAL_ results', 
						'sInfoFiltered': '(filtered from _MAX_ total)', 
						'sSearch': 'Search', 
						'sLengthMenu': 'Display _MENU_ records' 
						},
					'asStripClasses': [ 'odd', 'even' ]
				});
		}
	});
	
	
	// home page video player
	var player = $.flash.create({
		swf: '/assets/plugins/jwplayer/player.swf',
		width: 640,
		height: 360,
		hasVersion: 8,
		expressInstaller: '/assets/plugins/swfobject/expressInstall.swf',
		flashvars: {
			playlistfile: '/assets/plugins/jwplayer/homepage.xml',
			controlbar: 'none',
			icons: false,
			autostart: true,
			repeat: 'always'
		}
	});
	
	if(!player) {
		player = '<img src="/assets/images/home_video_static.jpg" />';
	} 
	
	$('#home_billboard_video_player').html(player);
}

$(window).load(public_setup);
