$(function() {
	
	/*General Date Picker*/
	$(".datepicker").datepicker();
	
	
	/*Events DatePicker*/
	$("#events-datepicker").datepicker({
		dateFormat: 'yy-mm-dd',
		onSelect: function(dateText, inst) { location.href=$('#events-datepicker-action-url').val() + dateText}
	});
	
	
	/*Top search box*/
		
	 if($(".search-box").val() == '' || $(".search-box").val() == 'Start your search'){
	 		$(".search-box").val("Start your search");
	 		$(".search-box").css("color", "#666666");
		}	
		
	 $(".search-box").blur(function () {
	 	if($(this).val() == ''){
			$(this).val("Start your search");
			$(this).css("color", "#666666");
	 	}	
	 });
	 $(".search-box").focus(function () {
	 	if($(this).val() == 'Start your search'){
	 		$(this).val("");
	 		$(this).css("color", "#000000");
	 	}
	 });
	
	$("#tabbed").tabs();
	
	$("#accordion").accordion({
			autoHeight: false
		});
	
	
	/*View all filters*/
	$(".viewalllink").click(function(){
		$("#flyout_" + this.id).show();
	})
	$(".closeviewalllink").click(function(){
		$("#flyout_" + this.id).slideUp();
	})
	
	
});