// JavaScript Document

$(document).ready(function() {
	$('#home-slideshow').cycle({ 
		fx:     'fade', 
		speed:   900, 
		timeout: 5000
	});
	
	$('.blog-slideshow').cycle({ 
		fx:     'fade', 
		speed:   900, 
		timeout: 5000
	});
	
	$('#slideshow').cycle({ 
		fx:     'fade', 
		next:   '#view-next',
		prev:   '#view-back',
		speed:   900, 
		timeout: 5000,
		after: function(curr,next,opts) {onAfter(curr,next,opts);}
	});

	function onAfter(curr,next,opts) {
		var caption = (opts.currSlide + 1) ;
		$('#counter').html(caption +"/"+opts.slideCount);
	};
	
	$(".tweet").tweet({
        username: "g_ni",
        join_text: "auto",
        count: 1,
        auto_join_text_default: "",
        auto_join_text_ed: "",
        auto_join_text_ing: "",
        auto_join_text_reply: "",
        auto_join_text_url: "",
        loading_text: "loading tweet..."
    });

});


