// JavaScript Document
	
			$(document).ready(function() {
				$("#maingallery").hover(
							function () {
							$('#gallerytext').animate({
													 top: '-40px'
													 },200);
							}, 
							function () {
							$('#gallerytext').animate({
													top: '0px'
													 },200);
							 }
					);
					
				
				$("li.datenavItem > a").click( function(e) {
					e.preventDefault();
					//if($(this).attr("id") != "11" ) {
						var temp = $(this).attr("id");
						//console.log(temp);
						dateScroll(temp);
						//}				
				});
									   
									   
									   
									   });
					
	function nextCal(){
		$('#calLinks').scrollTo('li:eq(6)', 800, {axis:'x'});
		$('#nextDate').css('display','none');
		$('#prevousDate').css('display','inline');
	}
	
	function prevousCal(){
		$('#calLinks').scrollTo('li:eq(0)', 800, {axis:'x'});
		$('#prevousDate').css('display','none');
		$('#nextDate').css('display','inline');
	}
	
	function showFeatured(numlink){
		
		var id = numlink.id;
		$('.isDate').removeClass('isDate');
		$("div.calposts .show").css('display','none');
		$("div.calposts .show").addClass('hide');
		$("div.calposts .show").removeClass('show');
		$('#'+id).addClass('isDate');
											  
		
		$("."+id).css('display','block');
		$("."+id).removeClass('hide');
		$("."+id).addClass('show');
	}
	
	function showdatenav(event){
		$('#dateicon').css('display','none');
		event.preventDefault();
						   
		$("#datelist").animate({
								width:682
								}, 300, "linear", function(){$("#datelinks").css('display','block');
															  $("#datelist").css('display','inline-block');
															  } );

		}
	
	function hidedatenav(event){
		$("#datelinks").css('display','none');
		event.preventDefault();
		$("#datelist").animate({
								width:0
								}, 300, "linear", function(){$("#datelist").css('display','none');
															 $("#dateicon").css('display', 'inline-block');	
															
															  } );
		
	}
		
											
	function dateScroll(links){
		if(links != null){
			//$.scrollTo($('#d'+links.id), 800, {offset:-90});
			$.scrollTo('#d'+ links, 800, {offset:-85})
			
			//$(this).preventDefault();
		}
	}	
	
	function jumpcal(){
		$('#dateicon').css('background-image','url(wp-content/themes/designphila/images/hover.png)');
		
	}
	
	function hidejumpcal(){
		$('#dateicon').css('background-image','url(wp-content/themes/designphila/images/idle.png)');
	}
	
	function galleryrollover(){
		$('#gallerytext').animate({
								  top: '-40px'
								  },200);
	}
	
	function galleryhide(){
		setTimeout(function(){
		$('#gallerytext').animate({
								  top: '0px'
								  },200);
							}, 100);
	}
	
	
		
	function showfilter(){
		if(document.getElementById('blogfilter') != null)
		{
			document.getElementById('blogfilter').style.display = 'block';
		}
	}
	
	function hidefilter(){
		if(document.getElementById('blogfilter') != null)
		{
			document.getElementById('blogfilter').style.display = 'none';
		}
	}
	
	function shownewsmenu(){
			document.getElementById('blogfilter2').style.display = 'block';
	}
	function hidenewsmenu(){
			document.getElementById('blogfilter2').style.display = 'none';
	}				   
		