$(function() 
{

	/* OPEN A NEW TAB FOR EXTERNAL LINKS 

	$("a").filter(function() 
	{
		return this.hostname && this.hostname !== location.hostname && "www" + this.hostname !== location.hostname;
	}
	).attr('target', '_blank');
	
	Hidden as no differentiating between www.engaging.net and engaging.net */

	/* DROP YOUR SHADOWS */

	$(".dropshadowed").dropShadow({ 
	    right: 1,
		top: 1,
		opacity: 1,
		blur: 1,
		color: "#000000"
	});
	
	/* ROUND YOUR CORNERS */

	$("#title, #footer-tab").corners("top-right top-left 20px transparent");
	$(".menu, code, #license").corners("bottom-right bottom-left top-right top-left 10px transparent");
	$("#footer-box").corners("bottom-right bottom-left 20px transparent");
	$(".comment").corners("bottom-right bottom-left top-right top-left 20px transparent");
	$("#comment-form").corners("bottom-right bottom-left top-right top-left 20px transparent");
	$("#prev").corners("bottom-left top-left 20px transparent");
	$("#next").corners("bottom-right top-right 20px transparent");
	
	/* MENUS - SWITCH AMONG THEM */
		
	$(".underneath").livequery('click', function(event)
	{
		$(".menu").removeClass("displayed");
		$(".menu").addClass("underneath");
		$(this).hide();
		$(this).appendTo("#menus");
		$(this).removeClass("underneath");
		$(this).addClass("displayed");
		$(this).show("puff", { 
			percent: 200 
		}, 500);
	});


	/* MENUS - MOUSEOVER ACCORDION TO REVEAL AND HIDE EACH TEASER */

	$("#menus .inactive h3").hoverIntent(
	function()
	{$(this).next("p").slideDown(150);},
	function()
	{
	}
	);

	$("#menus .inactive").bind("mouseleave", function(e)
	{$(this).children("p").slideUp(150);}
	);

	/* MENUS - CLICK AN ENTRY */

	$("#menus p, #menus h3").bind("click", function(e)
	{
		$(this).show("shake", { 
			distance: 5 
		}, 150 );
	});

	// TESTIMONIALS SLIDER

	$("#nuggets").easySlider({
		auto: true,
		continuous: true,
		controlsShow: false
	});

	// SCROLL BACK TO TOP

	$('#back-to-top').click(function()
	{
		$.scrollTo( '#header', 1000 );
	});
	
	$('#mono-image').mouseover(function()
	{
		$("#color-image").show();
		$("#mono-image").hide();
	});
	$('#color-image').mouseout(function()
	{
		$("#color-image").hide();
		$("#mono-image").show();
	});
	

});