(function($){

 	$(document).ready(function() {
 		 		
 		$(window).scroll(function() {
			if(($(this).scrollTop() != 0) && ($(this).scrollTop() >= 300)) {
				$('#backtotop a').animate({
					opacity: 1,
				    top: '0px'
				  }, 100);	
			} else {
				$('#backtotop a').animate({
					opacity: 0,
				    top: '-28px'
				  }, 100);
			}
		});
	 
		$('#backtotop a, a[href=#top]').click(function(){
			$('html, body').animate({scrollTop:0}, 'slow');
			return false;
		});
 		
 		$('.child a').each(function() {
			var href = $(this).find('a').attr('href');
			if (href == window.location.pathname) {
				$(this).addClass('current');
			}
		});
		
		$('#feed').rssfeed('http://gravitatedesign.com.php5-25.dfw1-2.websitetestlink.com/blog/feed', {
		    limit: 2,
		    header: false,
		    titletag: 'h5',
		    date: false,
		    content: false,
		    snippet: false
		});
		
		$(".container, .wide").fitVids();
	});
 	
})(window.jQuery);
function goToByScroll(id){
	$('html,body').animate({scrollTop: $("#"+id).offset().top},'slow');
}

