$(document).ready(function(){
	$('.zoom').fancyZoom({directory: '/assets/img/fancyzoom', closeOnClick: true, scaleImg: true});
	$('.back-to-top a').click(function(e){
		e.preventDefault();
		$.smoothScroll();
	});
	
	$('#features-link').click(function(e){
		e.preventDefault();
		$.smoothScroll({
			'scrollTarget': '#features-anchor'
		});
	});
	
	$('.tab-padding').click(function(e){
		$(this).parent().find('.current').removeClass('current');
		$(this).addClass('current');
		
		var id = $(this).attr('id').substring(2);
		
		$('.feature-item').each(function(k, el){
			var elId = $(el).attr('id').substring(2);
			
			if (id == elId) {
				$(el).show();
			} else {
				$(el).hide();
			}
		});
	});
});
