function base(){
	var intHeight = $('.homepage').height();
	var aboutHeight = $('.homepage').height();
	var intHeight2 = $('.homepage').height();
	var intWidth = $('.homepage').width();
	var intHeight =  intHeight - 756 - 75;
	var aboutHeight =  aboutHeight - 756 - 72;
	$("div.sliderGallery ul li").css({margin:intHeight});
	$("div.about").css({margin:aboutHeight});
	$(".slideshow").css({height:intHeight2});
	$(".slideshow").css({width:intWidth});
	$("div.sliderGallery > ul > li").css({width:intWidth });
	$("ul.nav li").after("<li>|</li>");
	$("ul.nav li:last").remove();
	$("ul.nav li:nth-child(2)").remove();
	
	//ajax form						
		$('#signupForm').ajaxForm(function() {
			if ( $(".field span").hasClass("LV_invalid") == false ){						   
			 alert('Thanks!');					   
			 $('div.tagline').delay().animate({ bottom: '+=0', height: '50px' }, 700, function() {} );
				$('a.submit').removeClass('close');	
				$('p.quip').text('');
				$('a.submit').css('color','#212121');
				$('p.quip').delay().append('<span>John Vaghi:</span> Wordsmith, Socialite, Marketeer, Technologist, Luddite'); 
		}
			else {  }
		}); 
		
	// form default text
	$("#signupForm #email").val("Email Address");
	$("#signupForm #email").focus(function(){
		if ( $(this).val() == "Email Address" ){
			$(this).val("");
		}
	});
	$("#signupForm #email").blur(function(){
		if ( $(this).val() == "" ){
			$(this).val("Email Address");
		}
	});
	$("#signupForm #firstname").val("Name");
	$("#signupForm #firstname").focus(function(){
		if ( $(this).val() == "Name" ){
			$(this).val("");
		}
	});
	$("#signupForm #firstname").blur(function(){
		if ( $(this).val() == "" ){
			$(this).val("Name");
		}
	});
	$("#signupForm #comments").val("Comments");
	$("#signupForm #comments").focus(function(){
		if ( $(this).val() == "Comments" ){
			$(this).val("");
		}
	});
	$("#signupForm #comments").blur(function(){
		if ( $(this).val() == "" ){
			$(this).val("Comments");
		}
	});
}

// about page display
$("a.about").click(function(){
	if ( $("a.about").hasClass("close") == false ) {
		if ( $("a.rag").hasClass("close") == true ) {
			$("div.rag").slideUp();
			$('a.rag').removeClass('close');	
		}
		$(".sliderGallery").fadeOut();
		$("img.bg").fadeOut();
		$('a.about').addClass('close');	
		$("div.about").slideDown();
		$('.nivo').nivoSlider({effect:'sliceUpDownRight', directionNav:false, pauseTime:5000, pauseOnHover:true, slices:35, animSpeed:400, controlNavThumbs:true, controlNavThumbsFromRel:true });
	}
	else {
		$(".sliderGallery").fadeIn();
		$("img.bg").fadeIn();
		$('a.about').removeClass('close');	
		$("div.about").slideUp();
	}
 });

// about page display
$("a.rag").click(function(){
	if ( $("a.rag").hasClass("close") == false ) {
		if ( $("a.about").hasClass("close") == true ) {
			$("div.about").slideUp();
			$('a.about').removeClass('close');	
		}
		$(".sliderGallery").fadeOut();
		$('a.rag').addClass('close');	
		$("img.bg").fadeOut();
		$("div.rag").slideDown();
	}
	else {
		$(".sliderGallery").fadeIn();
		$('a.rag').removeClass('close');
		$("img.bg").fadeIn();
		$("div.rag").slideUp();
	}
 });

// home page display
$("a.home").click(function(){
		$("div.about").slideUp();
		$("div.rag").slideUp();
		$(".sliderGallery").fadeIn();
		$("img.bg").fadeIn();
		$('a.about').removeClass('close');
 });



function carousel(){
	$(".sliderGallery").jCarouselLite({ btnNext: ".next", btnPrev: ".prev", visible:1, speed:800, auto:2 });	
}

function slider(){
	$('.slide').cycle({ fx:'scrollDown', easing:'bounceout', delay:  -2000 });	
}

function maximg(){
	$('.bg').maxImage({ isBackground: true });	
}


function expand(){
	$('a.submit').click(function() {
		if ( $("a.submit").hasClass("close") == false ) {
			$('div.tagline').animate({ bottom: '+=0', height: '360px' }, 700, function() {} );
				$('a.submit').addClass('close');		
				$('p.quip').text('');
				$('p.quip').append('Contact <span>Me</span>');
		}
		else {
			$('div.tagline').animate({ bottom: '+=0', height: '50px' }, 700, function() {} );
				$('a.submit').removeClass('close');	
				$('p.quip').text('');
				$('p.quip').append('<span>John Vaghi:</span> Wordsmith, Socialite, Marketeer, Technologist, Luddite');
		}
	});
}
