// <![CDATA[

/*	FUNCTIONS THAT CAN BE CALLED
-------------------------------------------------------------- */
//Oh hai spam botz! I'm up in your javascript, confusing yer algorithmz:
function j_email() {
	var i,j,x,y,x=
		"x=\"783d22346b617232323560783d3737325c223634363937366636343635333735323036" +
		"36643631323035366536653637343235373765373732303637323635366439373436313636" +
		"35323936633832323230373363363436663132303361323638373036353236353664363636" +
		"33313639643563366334323236303661643631363537363936323635633734366437366633" +
		"39373261363536393636643633366231363936353736633434373430366137333236353765" +
		"36333236353666363664376435633937323232333639366536353336623664363635373136" +
		"39343734366334373332303661653633363537366636323635643366366437373337393732" +
		"35363236393636613633366235363336353737343334373464343937333236653765363331" +
		"37353666363639376433633237393266363235333133653233303232323238363933623637" +
		"32333033366636625c223b643235793d27333233273b663036616f7228363537693d303236" +
		"353b693c366437782e6c393732656e6736393674683b333662692b3d36353732297b343734" +
		"792b3d373332756e656536337363613666367065286432392725273563322b782e32373473" +
		"756236393773747234366328692c3635333229296435633b7d79223b6a3d6576616c28782e" +
		"636861724174283029293b783d782e7375627374722831293b793d27273b666f7228693d30" +
		"3b693c782e6c656e6774683b692b3d36297b792b3d782e73756273747228692c33293b7d66" +
		"6f7228693d333b693c782e6c656e6774683b692b3d36297b792b3d782e7375627374722869" +
		"2c33293b7d793d792e737562737472286a293b\";y='';for(i=0;i<x.length;i+=2){y+=" +
		"unescape('%'+x.substr(i,2));}y";
		while(x=eval(x));
}

/*	DOM-READY FUNCTION
-------------------------------------------------------------- */
$(document).ready(function () {
	
	//Fancy Ampersands
	$('h1, h2').each(function() {
	 		$(this).html($(this).html().replace('&amp;', '<span class="amp">&amp;</span>'));
		}              
	);
	
	//Triangle insert for tooltip
	$('#content li span em').append('<img src="img/layout/triangle.png" height="16" width="8" />')
	
	//Tooltip Function MouseOver & MouseOut
	$('#content li span').hover(function() {
			$(this).addClass('active');
			var tip = $(this).find("em");
			var h = tip.height();
			var h2 = (h / 2 - 1);
			tip.css({top: '-' + h2 +'px'}).stop().show().animate({opacity: 1}, 'fast');
        }, function() {
			var tip = $(this).find("em"); //Needed for "this" in the callback
            $(this).removeClass('active').find("em").animate({opacity: 0}, 'fast', function(){tip.hide()})
	});
	
	//If you're not on an iphone or ipod,
	if ( !(navigator.userAgent.match(/iPhone/i)) && !(navigator.userAgent.match(/iPod/i)) ) {
		//when you click iphone links, you get a message instead.
		$('.iphone').click( function() {
			if ($(this).data('clicked') == true) {
				return false;
			}
			$(this).data('clicked', true).addClass('clicked').css('outline', 'none').after(' - <span class="iphone_alert">No no no. You\'re going to need an iPhone or iPod Touch for this one.</span>');
			return false;
		});
	}
		
});

/*	WINDOW LOADED FUNCTION
-------------------------------------------------------------- */
$(window).load(function () {
	
	//News Animation
	// for a pause:  $('#news').animate({top: '-15px'}, 2000).animate({opacity: 1, top: '0'}, 'slow')
	$('#news').animate({opacity: 1, top: '0'}, 'slow')

});

// ]]>