$(document).ready(function()	{
	//hoverflow navigation animation
	$('nav ul li').hover(function(e) {
	    $(this).hoverFlow(e.type, { width: 115 }, 'fast');
	  }, function(e) {
	    $(this).hoverFlow(e.type, { width: 107 }, 'fast');
	  });
	
	//Animate widgets
	//move the image in pixel
	    var move = -15;

	    //zoom percentage, 1.2 =120%
	    var zoom = 1.2;

	    //On mouse over those thumbnail
	    $('.widget').hover(function() {

	        //Set the width and height according to the zoom percentage
	        width = $('.widget').width() * zoom;
	        height = $('.widget').height() * zoom;

	        //Move and zoom the image
	        $(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});

	        //Display the widget-caption
	        $(this).find('div.widget-caption').stop(false,true).fadeIn(400);
	    },
	    function() {
	        //Reset the image
	        $(this).find('img').stop(false,true).animate({'width':$('.widget').width(), 'height':$('.widget').height(), 'top':'0', 'left':'0'}, {duration:100});    

	        //Hide the widget-caption
	        $(this).find('div.widget-caption').stop(false,true).fadeOut(400);
	    });
	
	
	
		//Animate Quote
		//move the image in pixel
		    var move = -15;

		    //zoom percentage, 1.2 =120%
		    var zoom = 1.2;

		    //On mouse over those thumbnail
		    $('#quote').hover(function() {

		        //Set the width and height according to the zoom percentage
		        width = $('#quote').width() * zoom;
		        height = $('#quote').height() * zoom;

		        //Move and zoom the image
		        $(this).find('img').stop(false,true).animate({'width':width, 'height':height, 'top':move, 'left':move}, {duration:200});

		        //Display the widget-caption
		        $(this).find('span#quote-caption').stop(false,true).fadeIn(800);
		    },
		    function() {
		        //Reset the image
		        $(this).find('img').stop(false,true).animate({'width':$('.widget').width(), 'height':$('.widget').height(), 'top':'0', 'left':'0'}, {duration:100});    

		        //Hide the widget-caption
		        $(this).find('span#quote-caption').stop(false,true).fadeOut(800);
		    });
	
	//Tweetjs 
	$(".tweet").tweet({
            username: "lordmuffin",
            join_text: "auto",
            avatar_size: 32,
            count: 3,
            auto_join_text_default: "we said,", 
            auto_join_text_ed: "we",
            auto_join_text_ing: "we were",
            auto_join_text_reply: "we replied to",
            auto_join_text_url: "we were checking out",
            loading_text: "loading tweets..."
        });
	
});
