var $j = jQuery.noConflict();
$j(document).ready(function(){
	$j("#slider").easySlider({
		auto: true, 
		continuous: true,
		prevText: '',
		nextText: '',
		pause: 4000
	});
	$j('.date-pick')
		.datePicker()
					.bind(
						'focus',
						function(event, message)
						{
							if (message == $.dpConst.DP_INTERNAL_FOCUS) {
								return true;
							}
							var dp = this;
							var $dp = $(this);
							$dp.dpDisplay();
							$('*').bind(
								'focus.datePicker',
								function(event)
								{
									var $focused = $(this);
									if (!$focused.is('.dp-applied')) // don't close the focused date picker if we just opened a new one!
									{
										// if the newly focused element isn't inside the date picker and isn't the original element which triggered
										// the opening of the date picker

										if ($focused.parents('#dp-popup').length == 0 && this != dp && !($.browser.msie && this == document.body)) {
											$('*').unbind('focus.datePicker');
											$dp.dpClose();
										}
									}
								}
							);
							return false;
						}
					).bind(
						'dpClosed',
						function(event, selected)
						{
							$('*').unbind('focus.datePicker');
						}
					);
});
