$(document).ready(function(){ 
$('#headermenu .<?=$current?>').parent().addClass('selected')
$('#headermenu a').hover(function(){$(this).addClass('hover');}, function(){ $(this).removeClass('hover')})
$(document).pngFix();

$('#subscription').submit(closeSubscription);
$('#subscription .close:eq(0) a').click(closeSubscription);

$('.wrapme').each(function()
{
	$(this).children('*').wrapAll('<div style="padding: 10px;"></div>')
});
				
function closeSubscription()
{
	$('#subscription #container').animate({ left: -178, opacity: 0 }, 888);
}
// Subscribe now contact details.

var subscribe_bg=new Image();

$(subscribe_bg)
	.load(function()
	{

		window.setTimeout(function() {
			$('#subscription #container').css('opacity',0).animate( { 'left' : -9, 'opacity' : 1 }, 2000, function()
			{
	      $(window).scroll(function() {
          moveto = $(this).scrollTop() + 80
					$('#subscription #container').stop().animate({ top: moveto }, 1550);
	      });
			})
		}, 3000);
		
	})
	.attr('src', 'images/subscribe-bg.gif');

	$('a.emailreading').click(function(){ $('form#emailReading' + $(this).attr('rel')).submit(); return false; });
	
//	equalHeight($('.steps'));

	function equalHeight(group) {
	    tallest = 0;
	    group.each(function() {
	        thisHeight = $(this).height();
	        if(thisHeight > tallest) {
	            tallest = thisHeight;
	        }
	    });
	    group.height(tallest);
	}

}); 

function dictionary(jumpto)
{
window.open('psychic-dictionary.php#'+jumpto,'about','left=20,top=20,width=800,height=500,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1');
			return false;				
}

function about(psychic)
{
window.open('about.php?name='+psychic.toLowerCase(),'about','left=20,top=20,width=800,height=500,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1');
			return false;				
}

function testimonial(psychic)
{
window.open('about.php?name='+psychic.toLowerCase()+'#testimonials','about','left=20,top=20,width=800,height=500,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1');
			return false;				
}

function openComparison()
{
window.open('phone-reading-email-reading-comparison.php','comparison','left=20,top=20,width=800,height=500,status=0,menubar=0,scrollbars=1,toolbar=0,resizable=1');
			return false;				
}