jQuery(document).ready(function () {

	/* Set the default text in the search form, if its blank */
	if ( jQuery('#s').attr('value') === '')
	{
		jQuery('#s').attr('value','Enter your search term');
	}

	/* When the field is selected, remove all of the text */
	jQuery('#s').focus(function() {
		jQuery('#s').attr('value','');
	});
	
	/* When the field is deselected, and its blank, reset the default text */
	jQuery('#s').blur(function() {
		if ( jQuery('#s').attr('value') === '')
		{
			jQuery('#s').attr('value','Enter your search term');
		}
	});

	jQuery('#mas_rfp_attachment_wrapper').css('display','none');
	
	jQuery('.attachmentclick').click(function(){
		jQuery('#mas_rfp_attachment_wrapper').toggle();
	});
	

	jQuery('.remove_mas_staff').click(function() {
		var killmasmember = '#'+jQuery(this).attr('rel');
		jQuery(killmasmember).html('Staff Member Removed, please click Save Changes below.');
	});

	jQuery('.remove_mas_advisory_board').click(function() {
		var killboardmember = '#'+jQuery(this).attr('rel');
		jQuery(killboardmember).html('Advisory Board Member Removed, please click Save Changes below.');
	});


	jQuery('.remove_hotel').click(function() {
		var killhotel = '#'+jQuery(this).attr('rel');
		jQuery(killhotel).html('Hotel Removed, please click Save Changes below.');
	});

    jQuery('ul.menu a:nth-child(11)').css('background','transparent none repeat scroll 0 0');

    jQuery('#hotel-images a').lightBox({
        fixedNavigation: true,
		imageLoading:			'/img/lightbox-ico-loading.gif',		// (string) Path and the name of the loading icon
		imageBtnPrev:			'/img/lightbox-btn-prev.gif',			// (string) Path and the name of the prev button image
		imageBtnNext:			'/img/lightbox-btn-next.gif',			// (string) Path and the name of the next button image
		imageBtnClose:			'/img/lightbox-btn-close.gif',		// (string) Path and the name of the close btn
		imageBlank:				'/img/lightbox-blank.gif'			// (string) Path and the name of a blank image (one pixel)
    });
	
});

jQuery(function()
{
	Date.format = 'mm/dd/yyyy';
	
	jQuery('.date-pick').datePicker();
	jQuery('#meetingdatestart').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				jQuery('#').dpSetStartDate(d.addDays(1).asString());
			}
		}
	);
	
	jQuery('#meetingdateend').bind(
		'dpClosed',
		function(e, selectedDates)
		{
			var d = selectedDates[0];
			if (d) {
				d = new Date(d);
				jQuery('#meetingdatestart').dpSetEndDate(d.addDays(-1).asString());
			}
		}
	);
});