// Fading top banners

$(function() {
$('#fader').cycle({ 
	fx:     'fade', 
    delay:  -2000,
	timeout: 5000
});
});


// Lavalamp left menu

$(document).ready(function () {
	
 
		//Set the height of the block
		$('#menu .block').height($('#menu li').height());
 
		//go to the default selected item
		topval = $('#menu .selected').position()['top'];
		selval = $('#menu a#sel').position()['top'];
		$('#menu .block').stop().animate({top: topval}, {easing: 'easeOutBack', duration:850});
 
		$('#menu li').hover(
			
			function() {
				
				//get the top position
				topval = $(this).position()['top'];
				
				//animate the block
				//you can add easing to it
				$('#menu .block').stop().animate({top: topval}, {easing: 'easeOutBack', duration:850});
				
				//add the hover effect to menu item
				$(this).addClass('hover');	
			},
			
			function() {		
				//remove the hover effect
				$(this).removeClass('hover');	
			}
		);
		
		$('#menuholder').hover(
			  function () { 
				$("#menu li.selected a").animate({ color: "#666666" }, 500);
			  }, 
			  function () { 
				$('#menu .block').stop().animate({top: selval}, {easing: 'easeOutBack', duration:1000});
				$("#general li.selected a").animate({ color: "#66CCCC" }, 500);
				$("#people li.selected a").animate({ color: "#AC1E1D" }, 500);
				$("#pets li.selected a").animate({ color: "#996600" }, 500);
				$("#weddings li.selected a").animate({ color: "#333333" }, 500);
				$("#commercial li.selected a").animate({ color: "#CC9966" }, 500);
				$("#courses li.selected a").animate({ color: "#3366CC" }, 500);
			  } 
		);
	
	});

 // font color animation 
 $(document).ready(function(){
	$("#general #menu li").hover(function() {
		$(this).children().animate({ color: "#66CCCC" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("#people #menu li").hover(function() {
		$(this).children().animate({ color: "#AC1E1D" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("#pets #menu li").hover(function() {
		$(this).children().animate({ color: "#996600" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("#weddings #menu li").hover(function() {
		$(this).children().animate({ color: "#333333" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("#commercial #menu li").hover(function() {
		$(this).children().animate({ color: "#CC9966" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("#courses #menu li").hover(function() {
		$(this).children().animate({ color: "#3366CC" }, 500);
		},function() {
		$(this).children().animate({ color: "#666666" }, 500);
	});
	$("a.ad").hover(function() {
		$(this).children("p").stop().animate({ marginTop: "-48px" }, 500);
		},function() {
		$(this).children("p").stop().animate({ marginTop: "-27px"  }, 500);
	});
	$("#general #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#F8FDFD" }, 500);
	});
	$("#people #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#FCF5F5" }, 500);
	});
	$("#pets #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#F9F6F0" }, 500);
	});
	$("#weddings #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#EDEDED" }, 500);
	});
	$("#commercial #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#FDFBF8" }, 500);
	});
	$("#courses #nav a.nonsel").hover(function() {
		$(this).stop().animate({ backgroundColor: "#F3DDDD" }, 500);
		},function() {
		$(this).stop().animate({ backgroundColor: "#F0F4FC" }, 500);
	});
});

function clearDefault(el) {
if (el.defaultValue==el.value) el.value = ""
}

function resetName(el) {
if (el.value=="") el.value = "Name"
}

function resetTelephone(el) {
if (el.value=="") el.value = "Telephone"
}

function resetDate(el) {
if (el.value=="") el.value = "Ideal date..."
}

$(function(){
	$('select#speedA').selectmenu();
});



