(function($) {
	window.app = {
		init: function() {
			return true;	
		},
		spritely: {
			init: function() {
				// spritely methods...
				$('#bird')
					.sprite({fps: 60, no_of_frames: 6})

				$('html').flyToTap();
				if (window.Touch || document.location.hash.indexOf('iphone') > -1) {
					// iPhone/iPad
					$('body').addClass('platform-iphone');
					// bird constraint is slightly smaller
					//$('#bird').spRandom({top: 0, left: 475, right: 350,, bottom: 60, speed: 400, pause: 1500});
					if (document.location.hash.indexOf('iphone') > -1) {
						$('body').addClass('platform-iphone');
					}
				} else {
					// non-iPhone
					// bird constraint is slightly wider
					var stage_left = (($('body').width() - 866) / 2);
					var stage_top = 30;
					//$('#bird').spRandom({top: stage_top - 20, left: stage_left - 20, right: 400, bottom: 140, speed: 300, pause: 500});
					$('#bird').spRandom({top: -20, left: 475, right: 350, bottom: 30, speed: 400, pause: 1500});
				}
				;	       		
	        },
		},

	};
	
	$(document).ready(function() {
		window.app.init();
		window.app.spritely.init();
	});
	

})(jQuery);




