// JavaScript Document
$(document).ready(function(){
	$("#blocks").smartCenter();  
	

	
	$("#blocks ol li").bind("mouseenter",function(){
	  // on hovering over find the element we want to fade *up*
		var fade = $('> div.selected', this);

		// if the element is currently being animated (to fadeOut)...
		//if (fade.is(':animated')) {
		//	// ...stop the current animation, and fade it to 1 from current position
		//	fade.stop().fadeTo(10, 1);
		//} else {
			fade.fadeIn(250);
		//}
    }).bind("mouseleave",function(){
      var fade = $('> div.selected', this);
		//if (fade.is(':animated')) {
		//	fade.stop().fadeTo(10, 0);
		//} else {
			fade.fadeOut(150);
		//}
    });

	
	function hideSubmenus(){
		$("#blocks ol.submenu li").css({ display:"none"});
	}
	
	$(window).resize(function(){
	  $("#blocks").smartCenter({
		  easeIn: "true",
		  wOffsetWidth: 10
		});  
	});
	
	/*
	$("#blocks ol li").fadeTo("fast", 1); 

	$("#blocks ol li").hover(function(){
		$(this).fadeTo("slow", 0.6); 
		$(this).css({backgroundPosition:"bottom left"});
	},function(){
		$(this).fadeTo("slow", 1); 
		$(this).css({backgroundPosition:"top left"});
	});
	*/
	
	// find the div.fade elements and hook the hover event
	/*$('#blocks ol li').hover(function() {
		// on hovering over find the element we want to fade *up*
		var fade = $('> div.selected', this);

		// if the element is currently being animated (to fadeOut)...
		if (fade.is(':animated')) {
			// ...stop the current animation, and fade it to 1 from current position
			fade.stop().fadeTo(250, 1);
		} else {
			fade.fadeIn(250);
		}
	}, function () {
		var fade = $('> div.selected', this);
		if (fade.is(':animated')) {
			fade.stop().fadeTo(250, 0);
		} else {
			fade.fadeOut(250);
		}
	});
	
	*/
	
	
	
});	





var futuraLtBT = {
    src: 'swf/futuraLtBT.swf'
    ,ratios: [6,1.41,9,1.35,15,1.29,21,1.25,22,1.22,27,1.24,29,1.21,34,1.22,41,1.21,45,1.2,46,1.21,59,1.2,68,1.19,69,1.2,96,1.19,97,1.18,102,1.19,103,1.18,107,1.19,108,1.18,112,1.19,114,1.18,116,1.19,120,1.18,121,1.19,1.18]
  };


  // You probably want to switch this on, but read <http://wiki.novemberborn.net/sifr3/DetectingCSSLoad> first.
  // sIFR.useStyleCheck = true;
  
  /*sIFR.activate(futuraLtBT);

  sIFR.replace(futuraLtBT, {
    selector: '#blocks ol.submenu li'
    ,css: [
      '.sIFR-root { text-align: left;  }'
      ,'a { text-decoration: underline; }'
      ,'a:link { color: #a7dafa; }'
      ,'a:hover { color: #a7dafa; }'
    ]
  });
  */