$(document).ready(function()
{
	/*setTimeout(function()
	{
		$("#content-swap1").fadeOut("slow", function ()
		{
			$("#content-swap2").fadeIn("slow");
			$("#content-swap1").remove();
		});
	}, 7000);
	*/
	
	// external links
    $('a[rel="external"]').click(function(event) 
	{
        event.preventDefault();
		pageTrack("/external/" + $(this).attr('href'));
		window.open($(this).attr('href'));
    }); 
	
	// anchor links
	$("a[rel=\"anchor\"]").click(function(event)
	{
		pageTrack("/anchor/" + $(this).attr('href'));
	});
	
	// mailto links
	$("a[href^=\"mailto:\"]").click(function(event)
	{
		pageTrack("/email/" + $(this).attr('href'));
	});
	
	// download links
	$("a[rel=\"download\"]").click(function(event)
	{
		pageTrack("/download/" + $(this).attr('href'));
	});
	
	//form fields	
	
			$('input[type="text"]').addClass("idleField");
       		$('input[type="text"]').focus(function() {
       			$(this).removeClass("idleField").addClass("focusField");
    		    if (this.value == this.defaultValue){ 
    		    	this.value = '';
				}
				if(this.value != this.defaultValue){
	    			this.select();
	    		}
    		});
    		$('input[type="text"]').blur(function() {
    			$(this).removeClass("focusField").addClass("idleField");
    		    if ($.trim(this.value) == ''){
			    	this.value = (this.defaultValue ? this.defaultValue : '');
				}
    		});	
 });
 
 /* ********************************************************** */
function pageTrack(url)
{
	if(pageTracker){ pageTracker._trackPageview(url); }
}
 /* ********************************************************** */
 
 