	jQuery(function($){
					
			
					
		var lightbox_name_default  = $("#lightbox-name").val();

		var lightbox_email_to_default = $("#lightbox-email-to").val();
		
		var lightbox_email_from_default = $("#lightbox-email-from").val();
					
		$("#lightbox-name").blur(function() {
		
		if($("#lightbox-name").val() == "")
		{
			$("#lightbox-name").val(lightbox_name_default);
		}
					
		});
		
		$("#lightbox-email-to").blur(function() {
		
		if($("#lightbox-email-to").val() == "")
		
		{
			$("#lightbox-email-to").val(lightbox_email_to_default);
		}
	
		});
		
		$("#lightbox-email-from").blur(function() {
		
		if($("#lightbox-email-from").val() == "")
		
		{
			$("#lightbox-email-from").val(lightbox_email_from_default);
		}
	
		});
		
		$("#lightbox-name").focus(function() {
		
		if($("#lightbox-name").val() == lightbox_name_default || $("#lightbox-name").val() == "You must enter your name...")
		{
			$("#lightbox-name").val("");
		}
		
		$("#lightbox-name").removeClass('error');
		
		});
		
		$("#lightbox-email-to").focus(function() {
		
		if($("#lightbox-email-to").val() == lightbox_email_to_default || $("#lightbox-email-to").val() == "You must enter your colleages email address...")
		{
			$("#lightbox-email-to").val("");
		}
		
		$("#lightbox-email-to").removeClass('error');
					
		});
		
		$("#lightbox-email-from").focus(function() {
		
		if($("#lightbox-email-from").val() == lightbox_email_from_default || $("#lightbox-email-from").val() == "You must enter your email address...")
		{
			$("#lightbox-email-from").val("");
		}
		
		$("#lightbox-email-from").removeClass('error');
					
		});		

		
		$("#lightbox-form input:submit").click(function() {	
			
			$('form#lightbox-form').submit(function() { return false; });
			
			formAction = $("form#lightbox-form").attr("action");
			
			var valid = true;
		
		
				if ($("#lightbox-name").val() == "" || $("#lightbox-name").val() == "Your Name..." || $("#lightbox-name").val() == "You must enter your name...")
		{
			valid = false;
			$("#lightbox-name").addClass('error');
			$("#lightbox-name").val("You must enter your name...");
		}	

		if (!checkEmail("lightbox-email-to")) 
		{
			valid = false;
			$("#lightbox-email-to").addClass('error');
			$("#lightbox-email-to").val("You must enter your colleages email address...");
		}
		
		if (!checkEmail("lightbox-email-from")) 
		{
			valid = false;
			$("#lightbox-email-from").addClass('error');
			$("#lightbox-email-from").val("You must enter your email address...");
		}		
			if(!valid)
			{
			return;
			}
				
			var str = $("form#lightbox-form").serialize();
			
			final = str + "&action=" + formAction;
			
			$.ajax({
				url: "/php/form-post.php",
				type: "POST",
				data: final,
				success: function(html){
					$("#form").hide(); // If successfully submitted hides the form
					$("#confirmation").fadeIn("slow");  // Shows "Thanks for subscribing" div
				}
			});
		});
	});
	
	function checkEmail(email)
	{	
		var pattern = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
		var emailVal = jQuery("#" + email).val();
		return pattern.test(emailVal);
	}
	
		$(document).ready(function(){
		$(".twitter").tweet({
          join_text: "auto",
          username: "shoopmodels",
          avatar_size: 0,
          count: 1,
          auto_join_text_default: "we said,", 
          auto_join_text_ed: "we",
          auto_join_text_ing: "we were",
          auto_join_text_reply: "we replied",
          auto_join_text_url: "we were checking out",
          loading_text: "loading tweets..."
		});

	// $("img.imagecache-profile_thumbnail").lazyload({ 
    // placeholder : "/themes/shoop/images/loadinfo.gif",
    // effect : "fadeIn",
	// threshold : -150
	// });
	
	$(".news-item .views-row:nth-child(4n)").addClass("last");
	
	$(".profile-thumbs li:nth-child(8n)").addClass("last-row");
	
	// $(".profile-thumbnail .views-row:nth-child(6n)").addClass("last");
	$("#node-14 .field-item:nth-child(6n)").addClass("last");
	
	});
	
	-->
