$(document).ready(function(){
	
	/*function signupshake() { 
			$('.email').effect( "shake", {times:5, distance:10}, 70 );
		};
		var shake = setInterval(signupshake, 10000);
		$('#mce-EMAIL').click(function() { 
			clearInterval(shake); 
		})
		
		$('.archive li:nth-child(odd)').addClass('alternate');*/

	var move = -10;
	var zoom = 1.1;
	$('.archive-post, .previous').hover(function() {
		width = $('.thumb').width() * zoom;
		height = $('.thumb').height() * zoom;
		$(this).find('.thumb img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});
	},
	function() {
		$(this).find('.thumb img').stop(false,true).animate({'width':$('.thumb').width()-10, 'height':$('.thumb').height()-10, 'top':'0', 'left':'0'}, {duration:100});	
	});
	
	$('.downloadbtn').click(function(){
		$('#member-check').slideToggle();
		return false;
 	});
	
	$('.downloadbtnPlay').click(function(){
		$(this).parent().parent().find('.member-check').slideToggle();
		return false;
 	});
	$('.downloadclose').click(function(){
		$(this).parent().slideToggle();
	});

	$('.memberCheckForm').submit(function(e){
		var memberCheck = $(this).parent();
		e.preventDefault;
		var datastring = $(this).serialize();
		
		memberCheck.html('<h2>Checking...</h2>');
		
		$.ajax({
			type: "POST",
			url: "http://www.trackinthebox.co.uk/wp-content/themes/Track%20In%20The%20box/member-check/getMemberInfo.php",
			data: datastring,
			success: function(data) {
			  	memberCheck.html(data);
			  	//.load("http://www.trackinthebox.co.uk/wp-content/themes/Track%20In%20The%20box/member-check/getMemberInfo.php");
			}
		  });
		  return false;
	});
	
	/*$("#background-image img").hover(function() {
		var bodyImage = $(this).attr('alt');
		$("body").css('backgroundImage', 'url(wp-content/themes/Track%20In%20The%20box/images/backgrounds/vaccines/'+bodyImage+'.jpg)');
	});*/
	
});




