$(document).ready(function(){

	$("a.anchorLink").anchorAnimate()
/*
	$(".tab_slide_parent").hover(function() {
        $(this).find('.tab_slide').animate({ paddingRight: "20px" }, 150);
    	},function(){
        $(this).find('.tab_slide').animate({ paddingRight: "10px" }, 70);
    });
	
	$(".tab_nav").hover(function() {
        $(this).animate({ paddingTop: "5px" }, 150);
    	},function(){
        $(this).animate({ paddingTop: "0px" }, 70);
    });
*/


	$("a[rel=gallery]").fancybox({
		'transitionIn'		: 'fade',
		'transitionOut'		: 'none',
		'titleShow' 		: 'false',
		'padding'			: '0',

	});





});
     
jQuery.fn.anchorAnimate = function(settings) {

 	settings = jQuery.extend({
		speed : 350
	}, settings);	
	
	return this.each(function(){
		var caller = this
		$(caller).click(function (event) {	
			event.preventDefault()
			var locationHref = window.location.href
			var elementClick = $(caller).attr("href")
			
			var destination = $(elementClick).offset().top;
			$("html:not(:animated),body:not(:animated)").animate({ scrollTop: destination}, settings.speed, function() {
				window.location.hash = elementClick
			});
		  	return false;
		})
	})
}

