

$(document).ready(function(){

//hover intent settings
$("header nav ul li a").hoverIntent({
	sensitivity: 2, 
	interval: 200, 
	over: fadeOut, 
	timeout: 500, 
	out: fadeIn
	});
$("header nav ul li a.active").animate({opacity: 0.40}, 0);
$("footer a").hoverIntent(fadeOut,fadeIn);
//$("article section li").eq(2).addClass("floatLeft");


$('.media') 
.cycle({ 
    fx:     'fade',
    speed: 'slow', 
    timeout:  8000,
    cleartype: 1, 
    cleartypeNoBg: true,
	pager: 'section.subNav',
	pagerEvent: 'mouseover',
    pause:1,
    pauseOnPagerHover: 1,
    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
    return '<a href="#" id="image' + idx + '"></a>'; 
    }

});
//html5 banner
$("#html5").css("background-color","#222").css("border-radius","4px");
$("p#html5").css("opacity","0").delay(4000).animate({
    "width": "275px", "opacity": "1"
  }, "slow").delay(8000).text("This site was written in HTML5").animate({"width": 0, "opacity": 0}, "fast");	
	
	function fadeOut(){  $(this).fadeTo(400,.5);}
	function fadeIn(){ $(this).fadeTo(1000,1);}
	$("#services").css("display","none").fadeIn(2000).animate({left:250,width:'500px'},500);

}); // close document.ready
