$(function(){	
	$.localScroll({
		duration:200
	});
	
	$(".forward").colorbox({innerWidth:"550px", innerHeight:"550px", iframe:true});
});





/**
 * jQuery's Countdown Plugin
 *
 * display a countdown effect at given seconds, check out the following website for further information:
 * http://heartstringz.net/blog/posts/show/jquery-countdown-plugin
 *
 * @author Felix Ding
 * @version 0.1
 * @copyright Copyright(c) 2008. Felix Ding
 * @license http://www.opensource.org/licenses/bsd-license.php The BSD License
 * @date 2008-03-09
 * @lastmodified 2008-03-09 17:48    		 
 * @todo error & exceptions handling
**/
jQuery.fn.CountDown = function(options) {
	/**
	* app init
	*/
	if(!options) options = '()';
	if(jQuery(this).length == 0) return false;
	var obj = this;
	if (!options.digits || options.digits <= 0 || options.digits == 'undefined')
	options.digits = 2 ;
	
	//alert(options.callback);
	
	/**
	* break out and execute callback (if any)
	*/
	if(options.seconds < 0 || options.seconds == 'undefined')
		{
			if(options.callback) eval(options.callback);
			return null;
		}
	
	/**
	* add leading zeros to number
	*/
	function pad_digits(nb, totalDigits) {
		nb = nb.toString();
		var pd = '';
		if (totalDigits > nb.length)
		for (i=0; i < (totalDigits - nb.length); i++)
		pd += '0';
		return pd + nb.toString();
	};

	/**
	* recursive countdown
	*/
	window.setTimeout(
	function() {
		jQuery(obj).html(String(pad_digits(options.hours, options.digits) + ' : ' + pad_digits(options.minutes, options.digits) + ' : ' + pad_digits(options.seconds, options.digits)));
		options.seconds -= 1 ;
		
		if (options.seconds < 0) {
			
			if (options.hours < 1 && options.minutes < 1){
				options.seconds = -1;
				options.minutes = 0;
				options.hours = 0;
			} else {
		
				options.seconds = 59;
				options.minutes -= 1;
				if (options.minutes < 0) {
					options.minutes = 59;
					options.hours -= 1;
					if (options.hours < 0) {
						options.hours = 23;
					}
				}
			}
		}
	
		jQuery(obj).CountDown(options);
	}
	, 1000
	);
	
	/**
	* return null
	*/
	return this;
}

