$(document).ready(function(){

	//Open all links with rel="external" in new window
	$('a[rel="external"]').click( function() {
			window.open( $(this).attr('href') );
			return false;
    });
	
	$(".primary-section:last img").css('display', 'none');
	$("body.blog .primary-section:last img").css('display', 'block');
	$("body.events .primary-section:last img").css('display', 'inline');
	
	//Clear value in search input box
	$(function() {
		swapValues = [];
		$(".a_input").each(function(i){
			swapValues[i] = $(this).val();
			$(this).focus(function(){
				if ($(this).val() == swapValues[i]) {
					$(this).val("");
				}
			}).blur(function(){
				if ($.trim($(this).val()) == "") {
					$(this).val(swapValues[i]);
				}
			});
		});
	});
	
	getTwitters('tweet', { 
		id: 'Harperfreedom', 
		count: 1, 
		enableLinks: true, 
		ignoreReplies: true, 
		clearContents: true,
		template: '%text% <a href="http://twitter.com/%user_screen_name%/statuses/%id%/">%time%</a>'
	});
	

	

	
	
});