$(document).ready(function(){

	$("a.listen").click( function(){$(this).parent().next('div').animate({height: "toggle"}, "slow");});
	$("a.toggle").click(function(){$(this).parent().next('div').animate({height: "toggle"}, "slow");});

	$("a[rel^='prettyPhoto[pp_gal]']").prettyPhoto({
	
		animationSpeed: 'slow', /* fast/slow/normal */
		padding: 40, /* padding for each side of the picture */
		opacity: 0.35, /* Value betwee 0 and 1 */
		showTitle: true, /* true/false */
		allowresize: true, /* true/false */
		counter_separator_label: '/', /* The separator for the gallery counter 1 "of" 2 */
		theme: 'dark_rounded' /* light_rounded / dark_rounded / light_square / dark_square */
	});
	

var randnum = Math.random();
var inum = 4;
// Change this number to the number of images you are using.
var rand1 = Math.round(randnum * (inum-1)) + 1;
images = new Array
images[1] = "http://www.lanagrant.com/images/templates/head_01.jpg"
images[2] = "http://www.lanagrant.com/images/templates/head_02.jpg"
images[3] = "http://www.lanagrant.com/images/templates/head_03.jpg"
images[4] = "http://www.lanagrant.com/images/templates/head_04.jpg"

// Ensure you have an array item for every image you are using.
var image = images[rand1]

setBackGround(image);


});

function setBackGround(tempImg) {

	document.getElementById('portrait').style.backgroundImage = "url(" + tempImg + ")";
}
// clearing  inputs on focus
function doClear(theText) 
{
	if (theText.value == theText.defaultValue) 
	{
		theText.value = "";
	} 
}

//replace input value with default on blur
function doReset(theText)
{
	if (theText.value == "")
	{
		theText.value = theText.defaultValue;
	}
}


