// javascripts and amendments to the jQuery plugin scripts

//slideshow speed
$.fn.cycle.defaults.speed   = 900;
$.fn.cycle.defaults.timeout = 6000;

$(function() {
	//run the code between the pre tags
    $('pre code').each(function() {
        eval($(this).text());
    });
	
	//top menu animate
	$('#top_nav ul li a')
	.mouseover(function() {
		$(this).stop().animate( {backgroundPosition: "-170px 0px"},500 );
	})
	.mouseout(function(){
		$(this).stop().animate( {backgroundPosition: "0px 0px"},500 );
	});
	
	//footer menu animate
	$('#footerlinks li a')
	.mouseover(function() {
		$(this).parent().stop().animate( {paddingLeft: "30px"},150 );
	})
	.mouseout(function(){
		$(this).parent().stop().animate( {paddingLeft: "20px"},150 )
	});
	
	//footer imagelinks fade
	$("#footerlinks2 p a img").hover(
		function () 
		{
			$(this).stop().fadeTo("fast", 0.66);
		}, 
		function () 
		{
			$(this).stop().fadeTo("fast", 1.00);
		}
	);
	
});
