// JAVASCRIPT FUNCTIONS

// GLOBAL PAGE MOVEMENT
$(document).ready(function(){
						   
	// AUTOMATED SCROLLING	
$('a[href*=#]').click(function(){
	if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
	&& location.hostname == this.hostname) {
		var $target = $(this.hash);
		$target = $target.length && $target
		|| $('[name=' + this.hash.slice(1) +']');
		if ($target.length) {
		var targetOffset = $target.offset().top;
		$('html,body')
		.animate({scrollTop: targetOffset}, 900);
		return false;
		}
	}
	});
	
	//TOGGLES ETC SECTION
	$("#etc").hide();
	$("#etc_btn").toggle(
		function (){$("#etc").slideDown("slow");},
		function hideEtc(){$("#etc").slideUp("slow");}
	);
	
//LIGHTBOX
	$(function(){
		$.superbox();
	});
	$.superbox.settings = {
		overlayOpacity: .9 // Background opaqueness
	};
	
});


// GET TWEETS
getTwitters('etc_tweet',{ 
	id: 'market4me', 
	count: 1, 
	enableLinks: true, 
	ignoreReplies: true, 
	clearContents: true,
	template: '%text%<br /><span class="date">%time%</span>'
});
