 $.fn.typewriter = function() {
	this.each(function() {
		var $ele = $(this), str = $ele.text(), progress = 0;
		$ele.text('');
		var timer = setInterval(function() {
			$ele.text(str.substring(0, progress++) + (progress & 1 ? '' : ''));
			if (progress >= str.length) clearInterval(timer);
		}, 1);
	});
	return this;
};

$(document).ready(function () { 
	$.ajaxSetup({cache: false});
	//tabs UI
	$("#menu").tabs("#content", { effect : 'ajax'});

	//Menu Styling
	$('.link').click(function() {
		var ID = $(this).attr('id');
		$('#'+ID).addClass("active-link"); 
		$("#menu li").each(function() {
			(($(this).attr('id')) != ID) ?  $(this).removeClass('active-link') : 0 ;
		}); 

	});


	//De-saturate images Trick
	$(".mask").mouseover(function() {
		$(this).fadeTo("fast",0);	
	});
	$(".mask").mouseleave(function() {
		$(this).fadeTo("fast",1);	
	});

});


