$(document).ready(function(){

jQuery.fn.extend({
	scrollTo : function(speed, easing) {
		return this.each(function() {
			var targetOffset = $(this).offset().top;
			$('html,body').animate({scrollTop: targetOffset}, speed, easing);
		});
	}
});

$('a.colorbox-youtube').each(function() {
	var str = '';
	var $rel = $(this).attr('rel');
	if($rel) {
		str = $rel;
	}
	var h = 560;
	var w = 340;
	if(str.length > 0) {
		var demi = str.split('_');
		h = demi[0];
		w = demi[1];
	}
	$(this).colorbox({'iframe':true, 'innerWidth':h, 'innerHeight':w});
});
$('.colorbox').colorbox({'width':'60%','opacity':.4});

});
