$(function(){   
  $("#background-flickr").flickr({     
    api_key: "2871382ff95ae6ce7fc3edc743c6ad9d",
	type: 'search',
	sort: 'date-posted-desc',
user_id: '87031589@N00',
	per_page: Math.floor((screen.width * screen.height) / (100*100)),
	callback : function(){
		
		$("#background-flickr ul li img").load(
			function() {
				$(this).fadeTo('slow', 0.20);
		    }
	 	).hover(
			function() {
				$(this).fadeTo('slow', 1.0, 'swing');
		    },
			function() {
				$(this).fadeTo('slow', 0.20, 'swing');
			}
	 	).click(
			function(){
				return false;
			}
		);
	}
  }); 
  
  $("#menu li").hover(
	function(){
		$(this).animate({marginLeft: '-=.666em'}, "slow", 'easeOutElastic');
		$(this).children("a").animate({color: '#2782CF'}, "fast");
	},
	function(){
		$(this).animate({marginLeft: '+=.666em'}, "fast");
		$(this).children("a").animate({color: '#eee'}, "slow");
	}
  );


  $("#twitter").tweet({
      join_text: "auto",
      avatar_size: 24,
      count: 1,
      auto_join_text_default: "Sangsouvanh said,", 
      auto_join_text_ed: "we",
      auto_join_text_ing: "Sangsouvanh was",
      auto_join_text_reply: "Sangsouvanh replied to",
      auto_join_text_url: "Sangsouvanh was checking out",
      loading_text: "Loading tweets..."
  });

});