var Cat = {
	image: 'http://static.jjok.co.uk/images/cat.png',
	width: 180,
	height: 180,
	//Animation time
	speed: 800,
	//Time between appearances
	wait: 30000,
	//Time the cat stays
	hangAround: 3000,
	element: null,
	init: function() {
		this.makeCat();
		var self = this;
		setInterval(function() {
			self.hiCat();
		}, this.wait);
	},
	makeCat: function() {
		this.element = $(document.createElement('img'));
		this.element.attr({src:this.image, width:this.width, height:this.height, className:'cat-popup', title:"I'm a cat.", alt:'Cat'});
		this.element.css({display:'none', position:'fixed', bottom:-this.height});
		$('body').append(this.element);
	},
	hiCat: function() {
		var self = this;

		this.element.
			css({display:'block'}).
			animate({bottom:0}, this.speed, 'swing').
			delay(this.hangAround).
			animate({bottom:-this.height}, this.speed, 'swing', function() {
				self.element.css({display:'none'});
			});
	}
};
