	$(document).ready(function(){

		// $('#memberLoginLink').click(function() {
		//	$("#menu_containerRightContentInfo").load("/manageAccount/memberLogin.cfm?miniMode=1");
		//	return false;
		// });
		
		// $('#memberLoginLink').click(function() {
		//	$('#menu_containerRightContentLogin').toggle();
		//	$('#menu_containerRightContentInfo').toggle();
		//	return false;
		// });
		
		// $('form').submit(function(){
		// On submit disable its submit button
	 	// $('input[type=submit]', this).attr('disabled', 'disabled');
		// });
		
		// advance form
		// $('#sfType').change(function() {
		// $('#searchBar_advanced3')[ ($(this).val() == 'Attraction') ? 'hide' : 'show' ]()
		// });
		
		$('#selectedDatepicker1').datepicker({
			useThemeRoller: true,
			alignment: 'bottomRight', 
			beforeShow: readSelected1,
			onSelect: updateSelected1, 
			minDate: new Date(2011, 1 - 1, 1),
			maxDate: new Date(2012, 12 - 1, 31), 
			showOn: 'both',
			showOtherMonths: true,
			nextText: '',
			showButtonPanel: true,
			buttonImageOnly: true,
			buttonImage: '/include/images/calendar.gif',
			buttonText: 'Select A Date'
		}); 
			 
		// Prepare to show a date picker linked to three select controls  
		function readSelected1() {  
			$('#selectedDatepicker1').val($('#selectMonth1').val() + '/' +  $('#selectDay1').val() + '/' + $('#selectYear1').val());  
			return {};  
		}  
		  
		// Update three select controls to match a date picker selection  
		function updateSelected1(date) {  
			$('#selectMonth1').val(date.substring(0, 2));  
			$('#selectDay1').val(date.substring(3, 5));  
			$('#selectYear1').val(date.substring(6, 10));  
		}
		
		$('#selectedDatepicker2').datepicker({
			useThemeRoller: true,
			alignment: 'bottomRight', 
			beforeShow: readSelected2,
			onSelect: updateSelected2, 
			minDate: new Date(2011, 1 - 1, 1),
			maxDate: new Date(2012, 12 - 1, 31), 
			showOn: 'both',
			showOtherMonths: true,
			nextText: '',
			showButtonPanel: true,
			buttonImageOnly: true,
			buttonImage: '/include/images/calendar.gif',
			buttonText: 'Select A Date'
		}); 
			 
		// Prepare to show a date picker linked to three select controls  
		function readSelected2() {  
			$('#selectedDatepicker2').val($('#selectMonth2').val() + '/' +  $('#selectDay2').val() + '/' + $('#selectYear2').val());  
			return {};  
		}  
		  
		// Update three select controls to match a date picker selection  
		function updateSelected2(date) {  
			$('#selectMonth2').val(date.substring(0, 2));  
			$('#selectDay2').val(date.substring(3, 5));  
			$('#selectYear2').val(date.substring(6, 10));  
		}
		
		$("a.memberLogin").colorbox({iframe:true, width:420, height:420});
		$("a.itineraryWindow").colorbox({iframe:true, width:400, height:300});
		$("a.reportWindow").colorbox({iframe:true, width:530, height:530});
		$("a.ownershipWindow").colorbox({iframe:true, width:530, height:530});
		$("a.commentWindow").colorbox({iframe:true, width:530, height:530});
		$("a.photoWindow").colorbox({iframe:true, width:500, height:500});
		$("a.memberLogin,a.itineraryWindow,a.commentWindow,a.photoWindow").click(function(){
			$().bind('cbox_closed', function(){
				window.location.reload( true );
			})
		}); 
		$("a[rel='lightbox']").colorbox({transition:"none", width:"75%", height:"75%"});
		
		/*
		$('.sfContainer').each(function() {
			$(this).qtip({
				content: $(this).children('.tipInfo'),
				position: {
					corner: {
						target: 'bottomMiddle',
						tooltip: 'topMiddle'
					}
				},
				style: {
					width: 245,
					background: '#fcfef8',
					padding: 10,
					tip: 'topMiddle',
					border: {
						width: 3,
						radius: 5,
						color: '#7bbb04'
					}
				}
			});	
		});	
	
		$('.sfContainer').remove('.tipInfo');

		$('.extraSearch').each(function() {
			$(this).qtip({
				content: $(this).children('.tipInfo'),
				show: { when: { event: 'mouseover' } },
				hide: { when: { event: 'inactive' }, delay: 2000 },
				position: {
					corner: {
						target: 'bottomMiddle',
						tooltip: 'topMiddle'
					}
				},
				style: {
					background: '#fcfef8',
					padding: 10,
					tip: 'topMiddle',
					border: {
						width: 3,
						radius: 5,
						color: '#049ce4'
					}
				}
			});	
		});	
	
		$('.extraSearch').remove('.tipInfo');
		*/
	
		$("#sfTypeEventContainer").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfTypeEventContainer'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});	
		$("#sfTypeAttractionContainer").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfTypeAttractionContainer'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});				
		$("#sfLocation").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfLocation'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});		
		$("#sfTags").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfTags'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});		
		$("#sfRadius").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfRadius'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});			
		$("#sfExact").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfExact'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});		
		$("#sfNoSports").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfNoSports'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});		
		$("#sfFilter").qtip({
			content: {
				url: '/include/tooltip.cfm?tooltipText=sfFilter'
			},
			position: {
				corner: {
					target: 'bottomMiddle',
					tooltip: 'topMiddle'
				}
			},
			style: {
				width: 245,
				background: '#fcfef8',
				padding: 10,
				tip: 'topMiddle',
				border: {
					width: 3,
					radius: 5,
					color: '#7bbb04'
				}
			}
		});		

	});
