
		(function($) {
			$(document).ready(function() {
				$('#logo').click(function() {
					document.location.href = 'http://zookeeper.com/';
				});
			
				$('#bird')
					.sprite({fps: 9, speed: 0.7, no_of_frames: 4})
					.spRandom({top: 50, bottom: 200, left: 300, right: 320})
					.isDraggable()
					.activeOnClick()
					.active();
					$('body').flyToTap();
				$('#bird2')
					.sprite({fps: 9, speed: 0.7, no_of_frames: 4})
					.spRandom({top: 20, bottom: 250, left: 1100, right: 520})
					.isDraggable()
					.activeOnClick()
					.active();
					$('body').flyToTap();	
				$('#clouds').pan({fps: 30, speed: 0.7, dir: 'left', depth: 10});
				$('#fin').pan({fps: 30, speed: 5, dir: 'right', depth: 30 });
				$('#wave3').pan({fps: 30, speed: 1, dir: 'left', depth: 30});
				$('#wave2').pan({fps: 30, speed: 1.5, dir: 'right', depth: 30});
				$('#wave1').pan({fps: 30, speed: 2, dir: 'left', depth: 70});
				$('#hill1, #hill2, #clouds').spRelSpeed(8);
				
				window.actions = {
					fly_slowly_forwards: function() {
						$('#bird')
							.fps(10)
							.spState(1);
						$('#hill1, #hill2, #clouds')
							.spRelSpeed(10)
							.spChangeDir('left');
					},
					fly_slowly_backwards: function() {
						$('#bird')
							.fps(10)
							.spState(2);
						$('#hill1, #hill2, #clouds')
							.spRelSpeed(10)
							.spChangeDir('right');
					},
					fly_quickly_forwards: function() {
						$('#bird')
							.fps(20)
							.spState(1);
						$('#hill1, #hill2, #clouds')
							.spRelSpeed(30)
							.spChangeDir('left');
					},
					fly_quickly_backwards: function() {
						$('#bird')
							.fps(20)
							.spState(2);
						$('#hill1, #hill2, #clouds')
							.spRelSpeed(30)
							.spChangeDir('right');
					},
					fly_like_lightning_forwards: function() {
						$('#bird')
							.fps(25)
							.spState(1);
						$('#hill1, #hill2, #clouds')
							.spSpeed(40)
							.spChangeDir('left');
					},
					fly_like_lightning_backwards: function() {
						$('#bird')
							.fps(25)
							.spState(2);
						$('#hill1, #hill2, #clouds')
							.spSpeed(40)
							.spChangeDir('right');
					}
				};
				
				
				
				window.page = {
					hide_panels: function() {
						$('.panel').hide(300);
					},
					show_panel: function(el_id) {
						this.hide_panels();
						$(el_id).show(300);
					}
				}
				
			});
		})(jQuery);
