$(function() {
	
	// External Links
	$('A[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
	
	//// Lavalamp
//	$(".lavalamp").lavaLamp({
//		fx: "backout",
//		speed: 700,
//		click: function(event, menuItem) {
//			return false;
//		}
//	});
//		// Set Lavalamp Default
//		var section = $("body").attr("id");
//		$("#menu_" + section).addClass("current");
	
	// Twitter Plugin
	$("#twitterBox").getTwitter({
		userName: "picotree",
		numTweets: 2,
		loaderText: "Loading PicoTweets...",
		slideIn: true,
		slideDuration: 750,
		showHeading: false,
		headingText: "Latest Tweets",
		showProfileLink: false,
		showTimestamp: true
	});
	
	// Services
	$(".show").click(function() {
		var side = "." + $(this).parent().attr("class");
		$(side + " .more").hide();
		$(side + " .less").show();
		$(side + " .serviceList li p").show();
		$(side + " .show").hide();
		$(side + " .hide").show();
		return false;
	});

	$(".hide").click(function() {
		var side = "." + $(this).parent().attr("class");
		$(side + " .more").show();
		$(side + " .less").hide();
		$(side + " .serviceList li p").hide();
		$(side + " .show").show();
		$(side + " .hide").hide();
		return false;
	});

	$(".serviceList li a").each(function() {
		$(this).click(function() {
			$(this).next().toggle();
			$(this).children().toggle();
			return false;
		});
	});

	// LIGHTBOX
	$('.be span a').lightBox();
	$('.msd span a').lightBox();
	$('.ben span a').lightBox();
	
	$('.be span a:gt(0)').hide();
	$('.msd span a:gt(0)').hide();
	$('.ben span a:gt(0)').hide();

});

Cufon.replace('h2, h4');

