/**
 * @author atsuji
 */
/*
google rss
*/
google.load("feeds", "1");
    function initialize() {
      var feed = new google.feeds.Feed("http://rssblog.ameba.jp/auataoka/rss20.xml");
	  feed.setNumEntries(7);
      feed.load(function(result) {
        if (!result.error) {
			$(result.feed.entries).each(function(i){
				if (this.title.match(/^PR:/)) {
				}
				else {
					var d = new Date(this.publishedDate);
					var t_month=d.getMonth()+1;
					var date = d.getFullYear() + "/" + t_month + "/" + d.getDate();
					$("ul#feed").append("<li><dl><dt>" + date + "</dt><dd><a href='" + this.link + "' target='_blank'>" + this.title + "</a><dd></dl></li>");
				}
			})
        }
      });
    }
google.setOnLoadCallback(initialize);

/*
pagescroll
*/
 $(function () {
	if (typeof document.body.style.maxHeight != "undefined") {
	// IE 7, mozilla, safari, opera 9
				$('a.lightbox').lightBox(); // Select all links with lightbox class
				$(".to_top").click(function(){
					$("body").scrollTo( "#top", 1600,{easing:"easeOutBounce"});
					return false;
				})
				$(".to_news").click(function(){
					$("body").scrollTo( "#news", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_prof").click(function(){
					$("body").scrollTo( "#profile", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_works").click(function(){
					$("body").scrollTo( "#works", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_diary").click(function(){
					$("body").scrollTo( "#diary", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_link").click(function(){
					$("body").scrollTo( "#link", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_contact").click(function(){
					$("body").scrollTo( "#contact", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				
	} else {
	// IE6, older browsers
				$('a.lightbox').lightBox(); // Select all links with lightbox class
				$(".to_top").click(function(){
					$("#wrapper").scrollTo( "#top", 1600,{easing:"easeOutBounce"});
					return false;
				})
				$(".to_news").click(function(){
					$("#wrapper").scrollTo( "#news", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_prof").click(function(){
					$("#wrapper").scrollTo( "#profile", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_works").click(function(){
					$("#wrapper").scrollTo( "#works", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_diary").click(function(){
					$("#wrapper").scrollTo( "#diary", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_link").click(function(){
					$("#wrapper").scrollTo( "#link", 1600,{easing:"easeInOutExpo"});
					return false;
				})
				$(".to_contact").click(function(){
					$("#wrapper").scrollTo( "#contact", 1600,{easing:"easeInOutExpo"});
					return false;
				})
	} 
	/*
	mail
	*/
	var mail=$("a#mail_to");
	mail.text("taokakazuya@mac.com");
	mail.attr("href","mailto:taokakazuya@mac.com")
	
				
});
/*
fullscreenr
*/
var FullscreenrOptions = { 
	width: 1200,
	height: 799,
	bgID: '#bgimg',
	wrapperID:'#bgbox'
}; 
jQuery.fn.fullscreenr(FullscreenrOptions);
