document.location.hash = "Portfolio";
    
	var last;

		$(document).ready( function () {
			$("#portfolio").fbGenerator({albumid:179008988793876},function(){
	        
	        });

			$.anchorHandler.add(/\#/, function () {
				$("Menu").slideDown("slow");
				$('#footer').hide();
				//This is where the magic happens
				$('.active').fadeOut("fast", function () {
					document.title = "Red Scandal Graphics | "+document.location.hash.substr(1);
					$('.active').removeClass("active");
					$(document.location.hash.toLowerCase()).slideDown("slow", function () {
						$(this).addClass("active");
						$(document.location.hash + '-nav').show("slow", function () {
							$("Menu").slideUp("slow");
							$(this).addClass("active");
							$('#footer').fadeIn();
						});
					});
				});
			});
		});

		$().ready( function () {

    		$.validator.setDefaults({
    			submitHandler: function () {
    				$('#contact').html("Submitted.")
    			}
    		});
			// validate signup form on keyup and submit
			$("#contactform").validate({

				rules: {

					Name: "required",

					Company: "required",

					Phone: {
						required: true,
						minlength: 10
					},

					Email: {

						required: true,

						minlength: 5,
						email:true,

					},

				},

				messages: {
					Name: "Please enter your name",
					Name: {
						required: "Please enter a your name",
						minlength: "Thats an awfully short phone number"

					},

					Email: {
						required: "Please enter your email",
						email: true
					},
					Phone:{
						required:"Please enter your phone number"
					},
					Company:{
						required:"Please enter your company"
					},
					Email: "Please enter a valid email address",
				}

			});

		});

