$(document).ready(function(){

    //Preserves the mouse-over on top-level menu elements when hovering over children
    $("#nav ul").each(function(i){
      $(this).hover(function(){
        $(this).parent().find("a").slice(0,1).addClass("active"); 
      },function(){ 
        $(this).parent().find("a").slice(0,1).removeClass("active"); 
      });
    });

    // IE6 Fix: Drop-down fix due to lack of support for :hover on list elements
    if($.browser.msie && ($.browser.version < 7)) {
      $("#nav").each(function(i){
        $(this).find("li").hover(function(){
          $(this).addClass("sfhover");
        },function(){ 
          $(this).removeClass("sfhover"); 
        });
      });
    }
  
  });
  
  $(document).ready(function(){
	$(".apps").fadeTo(3000, 0.5); // This sets the opacity of the thumbs to fade down to 0% when the page loads

	$(".apps").hover(function(){
		$(this).stop().fadeTo(200, 1); // This should set the opacity to 100% on hover
	},function(){
   		$(this).stop().fadeTo(900, 0.5); // This should set the opacity back to 0% on mouseout
	});
});


  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-15684833-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();
