$(document).ready(function() {
	//Homepage branding
	$('body#home div#branding > ul > li > h2 > a').click(function() {
		if($(this).parent().siblings('.brandingContent').css('display') == 'none') {
			$('body#home div#branding > ul .brandingContent').slideUp(1500);
		}
		$(this).parent().siblings('.brandingContent').slideToggle(1500);
		return false;
	});
	//End homepage branding

	//Add/Remove Input Values
	$('input[title]').each(function() {
		if($(this).val() == '') {
			$(this).val($(this).attr('title'));	
		}
		
		$(this).focus(function() {
			if($(this).val() == $(this).attr('title')) {
				$(this).val('');	
			}
		});
		$(this).blur(function() {
			if($(this).val() == '') {
				$(this).val($(this).attr('title'));	
			}
		});
	});
	//End Add/Remove Form Values

	//Share this and print
	$('ul#share li.share > a').click(function() {
		$(this).parent().children('ul').slideToggle('normal');
		return false;
	});
	$('ul#share').append('<li class="print"><a href="#print">Print</a></li>');
	$('ul#share li.print a').click(function() {
		window.print();
		return false;
	});
	$('ul#share').show();
	//End share this and print

	//Flex reporter
	$('ul.flexReporter div.articleContent').hide();
	$('ul.flexReporter li a.articleHeading').click(function() {
		$(this).css('outline','none');
		$(this).parent().parent().toggleClass('open');
		$(this).parent().parent().children('.summary').slideToggle();
		$(this).parent().parent().children('.articleContent').slideToggle();

		$.scrollTo($(this).parent().parent(),1000);
		return false;
	});
	//End flex reporter

	//Google analytics
	// $.gaTracker('UA-8497304-1');
	//End Google Analytics
});