//------------------------------------
//	ENGAGE.JS
//	Author: 	Engage Interactive
//	Requires:	jquery 1.4.2			
//------------------------------------

$(function(){
//BEGIN jQuery

	//TARGET BLANK REPLACEMENT
	
	$(".external").attr("target","_blank");
	
	//CLICKY FORM TITLES
	
	$('form input[title]').each(function(){
		$(this).attr('value', $(this).attr('title'));
	});
	$('form input[title]').focus(function(){
		if($(this).attr('value') == $(this).attr('title')){
			$(this).attr('value', '');
		}
	});
	$('form input[title]').blur(function(){
		if($(this).attr('value') == $(this).attr('title') || $(this).attr('value') == ''){
			$(this).attr('value', $(this).attr('title'));
		}
	});

	
	//LEFT NAV 
	$('.left_col ul li:first').addClass('first');
	$('.left_col ul li:last').addClass('last');
	
	
	//FANCY LIST
	$('#content ul.fancylist li:last').addClass('last');
	$('#content ul.fancylist > li:even').addClass('even');


});

jQuery.extend( jQuery.easing,
{
	easeInOutExpo: function (x, t, b, c, d) {
		if (t==0) return b;
		if (t==d) return b+c;
		if ((t/=d/2) < 1) return c/2 * Math.pow(2, 10 * (t - 1)) + b;
		return c/2 * (-Math.pow(2, -10 * --t) + 2) + b;
	}
});

/*
 * jQuery Timer Plugin
 * http://www.evanbot.com/article/jquery-timer-plugin/23
 *
 * @version      1.0
 * @copyright    2009 Evan Byrne (http://www.evanbot.com)
 */

jQuery.timer = function(time,func,callback){
	var a = {timer:setTimeout(func,time),callback:null}
	if(typeof(callback) == 'function'){a.callback = callback;}
	return a;
};

jQuery.clearTimer = function(a){
	clearTimeout(a.timer);
	if(typeof(a.callback) == 'function'){a.callback();};
	return this;
};
