(function($){
	$.fn.equalHeights = function(minHeight, maxHeight) {
		tallest = (minHeight) ? minHeight : 0;
		this.each(function() {
			if($(this).height() > tallest) tallest = $(this).height();
		});
		if((maxHeight) && tallest > maxHeight) tallest = maxHeight;
		return this.each(function() {
			$(this).height(tallest).css("overflow","none");
		});
	}
	Cufon.replace('#nav a,h5', { fontFamily: 'AvantGarde',hover:true });
	Cufon.replace('h2,h6', { fontFamily: 'Pointy'});
	Cufon.replace('h3,.h3', { fontFamily: 'BigNoodleTitling' })
	Cufon.replace('#letter', { fontFamily: 'Bohemian typewriter' })
	$('.gallery a').lightBox();
	$(".tweet").tweet({
            username: "vengatweets",
            join_text: "auto",
            avatar_size: 32,
            count: 5,
            auto_join_text_default: "",
            auto_join_text_ed: "",
            auto_join_text_ing: "",
            auto_join_text_reply: "",
            auto_join_text_url: "",
            loading_text: "loading tweets..."
    });
	$('a.send-youtube').click(function(e){
		e.preventDefault();
		e.stopPropagation();
		var obj = $(this);
		if(obj.parent().prev().val()!="" && obj.parent().prev().val().match(/youtube\.com\/watch\?v=([^&]+)/)[1]){
	
			$.ajax({
				url:'/send_youtube_link/',
				type: 'post',
				data: {
					link: obj.parent().prev().val()
				},
				success: function(){
					obj.parent().fadeOut('slow', function(){
						obj.parent().parent().remove();
					})
				}
			});
		}
		return false;
	});
})(jQuery)

