jQuery(document).ready(function() {
	jQuery('div.popup a').click(function(){
		id = jQuery(this).attr('rel');
		jQuery('<div id="ajax-popup"><img src="/wp-content/themes/gorgeousdoodles/images/ajax-loader.gif" id="ajax-loader-img"/>Loading puppy info...</div>').hide().appendTo('body').load('http://gorgeousdoodles.com/ajax-handler/?id='+id, function() {
		  jQuery('.whatever').find('a').removeAttr('onclick').removeAttr('href');}).modal({
			opacity:80,
			overlayCss: {backgroundColor:"#BF87A9"},
			position: [20]
		});
		
		return false;
	});    
	
	jQuery('#meerkat').meerkat({
		background: 'url(images/meerkat-bot-bg.png) repeat-x left top',
		height: '120px',
		width: '480px',
		position: 'top',
		close: '.close-meerkat',
		dontShowAgain: '.dont-show',
		animationIn: 'slide',
		animationSpeed: 500, 
		delay: 3,
		timer: 10,
		onMeerkatShow: function(){
			//$(this).addClass('meerkat-wrap');
		}		
	});	 
	
	jQuery('#meerkat .external').attr('onclick','').attr('href','/puppies-for-sale');      
});
