
  var GB_ANIMATION = true;
  $(document).ready(function(){
    $("a.greybox").click(function(){
      var t = this.title || $(this).text() || this.href;
      GB_show(t,this.href,450,800);
      return false;
    });
  });

  $(document).ready(function() {
	  setTimeout("animation()",300);
  });
  
  function animation(){
	  sun_raft();
	  cloud1();
	  cloud2();
	  cloud3();
	  $("#greetings").animate({top: '125px' }, {queue:false, duration:600, easing:'easeOutBounce'});
	  $("#stamp").animate({left: '595px' }, {queue:false, duration:1200, easing:'easeOutBounce'});	
  }
	  
  function sun_raft(){
	  $("#sun").animate({opacity:".7"},1000).animate({opacity:"1"},1000);
	  $("#cloud").animate({left:"-=5px"},800).animate({left:"+=5px"}, 800);
	  $("#cloud2").animate({left:"-=4px"},900).animate({left:"+=4px"}, 900);
	  $("#cloud3").animate({left:"-=7px"},1000).animate({left:"+=7px"}, 1000);
	  $("#raftripple").animate({opacity:".1"},1000).animate({opacity:"1"},1000);
	  setTimeout("sun_raft()",500);
  }

			
	$(function()
	{
		// this initialises the demo scollpanes on the page.
		$('#pane1').jScrollPane();
		$('#pane2').jScrollPane({showArrows:true});
		$('#pane3, #pane4').jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
		
		// this allows you to click a link to add content to #pane4 and shows how to 
		// reinitialise the scrollbars when you have done this.
		$('#add-content').bind(
			'click',
			function()
			{
				$('#pane4').append($('<p></\p>').html($('#intro').html())).jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
			}
		);
		// and this allows you to click the link to reduce the amount of content in
		// #pane4 and reinitialise the scrollbars.
		$('#remove-content').bind(
			'click',
			function()
			{
				$('#pane4').empty().append($('<p></\p>').html($('#intro').html())).jScrollPane({scrollbarWidth:20, scrollbarMargin:10});
			}
		);
	});

