/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Functions */
$(document).ready(function(){

	
	/* When menu item is clicked, scroll down to target with -64px offset. 
	 * Target is decided according to h1[name='xxx'] instead of id. 
	 */
	$('#navigation li.menuLink').click(function(e) {
	    e.preventDefault();
		$this =$(this);
	    var target = ($this.data('name') + ', h1[name="' + $this.data('name') + '"]');
	    $target = $(target);
	    $('html, body').stop().animate({
	        'scrollTop': $target.offset().top -64
	    }, 400, 'swing');
	});
});