// JavaScript Document
Cufon.replace('#news h1');
Cufon.replace('#news h2');
Cufon.replace('#news h3');
Cufon.replace('#main h1');
Cufon.replace('#main h2');
Cufon.replace('#main h3');
(function($) {

	$.fn.nav = function(options) {
	
		options = $.extend({
			overlap : 20,
			speed : 500,
			reset : 100,
			color : '#0b2b61',
			easing : 'easeOutExpo'
		}, options);
	
		return this.each(function() {
		
		 	var nav = $(this),
		 		currentPageItem = $('#selected', nav),
		 		blob,
		 		reset;
		 		
		 	$('<li id="blob"></li>').css({
		 		width : currentPageItem.outerWidth(),
		 		height : currentPageItem.outerHeight() + options.overlap,
		 		left : currentPageItem.position().left,
		 		top : currentPageItem.position().top - options.overlap / 2,
		 		backgroundColor : options.color
		 	}).appendTo(this);
		 	
		 	blob = $('#blob', nav);
					 	
			$('li:not(#blob)', nav).hover(function() {
				// mouse over
				clearTimeout(reset);
				blob.animate(
					{
						left : $(this).position().left,
						width : $(this).width()
					},
					{
						duration : options.speed,
						easing : options.easing,
						queue : false
					}
				);
			}, function() {
				// mouse out	
				reset = setTimeout(function() {
					blob.animate({
						width : currentPageItem.outerWidth(),
						left : currentPageItem.position().left
					}, options.speed)
				}, options.reset);
				
			});
		 
		
		}); // end each
	
	};

})(jQuery);

		$(document).ready(function() {
			$.featureList(
				$("#tabs li a"),
				$("#output li"), {
					start_item	:	0
				}
			);
			/*
			// Alternative
			$('#tabs li a').featureList({
				output			:	'#output li',
				start_item		:	1
			});
			*/
		});
		
		$(function () {
		 $('#slider').anythingSlider(),{ // add any non-default options here
				resizeContents      : false,
		 		themeDirectory      : '../css/theme-metallic.css',
				}
		});
				
