$(document).ready(function(){
  $('a[href*=#]').click(function() {
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
	  var $target = $(this.hash);
	  $target = $target.length && $target
	  || $('[name=' + this.hash.slice(1) +']');
	  if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 1000);
	   return false;
	  }
	}
  });
});

/*
$(document).ready(function() {
	$("div.screenshots a").fancybox({
		'overlayShow'			: false,
		'zoomSpeedIn'			: 600,
		'zoomSpeedOut'			: 500,
		'easingIn'				: 'easeOutBack',
		'easingOut'				: 'easeInBack'
	});
});
*/

$(document).ready(function() {	
	$("a.video").click(function() {
		$.fancybox({
			'overlayShow'	: true,
			'padding'		: 20,
			'autoScale'		: false,
			'transitionIn'	: 'none',
			'transitionOut'	: 'none',
			'titleShow' 	: false,
			'showNavArrows'	: false,
			'width'			: 600,
			'height'		: 450,
			'href'			: this.href.replace(new RegExp("([0-9])","i"),'moogaloop.swf?clip_id=$1'),
			'type'			: 'swf'
		});

		return false;
	});
	
	/*$(".imageStyle").fancybox({
		'overlayShow'	: true,
		'padding'		: 20,
		'transitionIn'	: 'none',
		'transitionOut'	: 'none',
		'titleShow' 	: false
	});*/

	$('#newsticker').innerfade({
		animationtype: 'fade',
		speed: 500,
		timeout: 5000,
		type: 'sequence',
		containerheight: '1em'
	});
});
