/*
 *
 * http://www.elmastudio.de/webdesign/smooth-scroll-elegantes-scrollen-mit-jquery/
 *
 */
jQuery(function ($) {
	/* You can safely use $ in this code block to reference jQuery */

$(function(){
    $('a[href*=#]').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
        && location.hostname == this.hostname) {
            var $target = $(this.hash);
            $target = $target.length && $target || $('[name=' + this.hash.slice(1) +']');
            if ($target.length) {
                var targetOffset = $target.offset().top;
                $('html,body').animate({scrollTop: targetOffset}, 1000);
                return false;
            }
        }
    });
});

// http://blog.medianotions.de/de/artikel/2009/smoothscroll-fuer-jquery
// $ SmoothScroll | Version 10-04-30
/*$('a[href*=#]').click(function() {

	// duration in ms
	var duration=1000;

	// easing values: swing | linear
	var easing='swing';

	// get / set parameters
	var newHash=this.hash;
	var target=$(this.hash).offset().top;
	var oldLocation=window.location.href.replace(window.location.hash, '');
	var newLocation=this;

	// make sure it's the same location		
	if(oldLocation+newHash==newLocation)
	{
		// animate to target and set the hash to the window.location after the animation
		$('html:not(:animated),body:not(:animated)').animate({ scrollTop: target }, duration, easing, function() {

			// add new hash to the browser location
			window.location.href=newLocation;
		});

		// cancel default click action
		return false;
	}
});*/

});
