$(function(){

//画像のロールオーバー
  /*$('a img').hover(function(){
    $(this).attr('src', $(this).attr('src').replace('_off', '_on'));
    }, function(){
      if (!$(this).hasClass('currentPage')) {
      $(this).attr('src', $(this).attr('src').replace('_on', '_off'));
    }
  });*/
  
  //別ドメインを別窓展開
  /*$("a[href^='http://']").attr("target","_blank");*/

  //ページトップへスクロール
  $(".pageTop a").click(function(){
    $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
    return false;
  });
  
  //ボックス全体をクリック可にする
  /*$(".sampleBox").click(function(){
    window.location=$(this).find("a").attr("href");
    return false;
  });*/
  
  //tableのセルにクラスをつける
  $("tr:odd").addClass("odd");
  
  //画像の臨機切れ時に表示する画像
  $(document).ready(function(){
	$("img").error(function(){
    $(this).attr({src:'http://webdrawer.net/common/img/missing.gif',alt:'画像が見つかりません'});
  		});
	});
  
  //ブラウザのバージョン判定
  // IE（IE7以上）
  /*if ($.browser.msie && $.browser.version > 6 ) $(".browserBox").css("background", "#ff99cc" );*/
  // IE（IE6以下）
  /*if ($.browser.msie && $.browser.version <= 6 ) $(".browserBox").css("background", "#ffff99" ); */ 
  // Firefox
  /*if ($.browser.mozilla ) $(".browserBox").css("background", "#c8ffd0" );*/
  // Safari
  /*if( $.browser.webkit ) $(".browserBox").css("background", "#b1e1ff" );*/
  
  //画像プリローダー
  /*$(function () {
    $('.imgBox img').hide();//ページ上の画像を隠す
  });

  var i = 0;
  var int=0;
  $(window).bind("load", function() {//ページコンテンツのロードが完了後、機能させる
    var int = setInterval("doThis(i)",500);//フェードするスピード
  });
 
  function doThis() {
    var images = $('img').length;//画像の数を数える
    if (i >= images) {// ループ
      clearInterval(int);//最後の画像までいくとループ終了
    }
    $('img:hidden').eq(0).fadeIn(500);//一つずつ表示する
    i++;
  };*/
  
  //IE6以下にメッセージを表示
  /*if ( $.browser.msie && $.browser.version <= 6 ) {
    $('body').prepend('<div class="error">あなたは旧式ブラウザをご利用中です。このウェブサイトを快適に閲覧するにはブラウザをアップグレードしてください。</div>');
  };*/
  
  //ボックスを消す
  /*$(".deleteBox .delete").click(function(){
    $(this).parents(".deleteBox").animate({ opacity: "hide" }, "slow");
  });*/
  
  //フォーカスしてるラベルにクラスをつける
  /*$("form :input").focus(function() {
     $("label[for='" + this.id + "']").addClass("labelfocus");
  });

  $("form :input").blur(function() {
    $("label[for='" + this.id + "']").removeClass("labelfocus");
  });*/
  
  //フォームにダミーテキスト
  /*$(".focus").focus(function(){
    if(this.value == "キーワードを入力"){
      $(this).val("").css("color","#f39");
    }
  });
  
  $(".focus").blur(function(){
    if(this.value == ""){
      $(this).val("キーワードを入力").css("color","#969696");
	}
  });*/
  
  //入力数をカウント
  /*$("textarea").keyup(function(){
    var counter = $(this).val().length;
    $("#countUp").text(counter);
    if(counter == 0){
      $("#countUp").text("0");
    }
    if(counter >= 10){
      $("#countUp").css("color","red");
    }
	else{
      $("#countUp").css("color","#666");
	}
  });*/
  
  //ラジオチェックボタンの装飾
  /*$(".checkbox").change(function(){
    if($(this).is(":checked")){
      $(this).next("label").addClass("LabelSelected");
    }
	else{
      $(this).next("label").removeClass("LabelSelected");
    }
   });
  
  $(".radio").change(function(){
    if($(this).is(":checked")){
      $(".RadioSelected:not(:checked)").removeClass("RadioSelected");
      $(this).next("label").addClass("RadioSelected");
    }
  });*/
  
  //スライドパネル
  /*$(".open").click(function(){
    $("#slideBox").slideToggle("slow");
  });*/
  
  //アコーディオン
  /*$('#accordion dd').hide();
  $('#accordion dt a').click(function(){
    $('#accordion dd').slideUp();
    $(this).parent().next().slideDown();
    return false;
  });*/
  
  //ツールチップ
  /*$(".tooltip a").hover(function() {
    $(this).next("span").animate({opacity: "show", top: "-75"}, "slow");}, function() {
    $(this).next("span").animate({opacity: "hide", top: "-85"}, "fast");
   });*/
  
  //プリント
  /*$('a.print').click(function(){
    window.print();
    return false;
  });*/
  
  //最新のつぶやきを表示
  /*$.getJSON("http://twitter.com/statuses/user_timeline/xxxxxxxxxxxxx.json?callback=?", function(data) {
    $("#twitter").html(data[0].text);
  });*/
  
  //ボタンを押した時に音
  /*$(function(){*/
  // クリック
  /*  $('a.click').click(function(){
      $('embed').remove();
      $('body').append('<embed src="click.wav" autostart="true" hidden="true" loop="false">');
    });
  });*/
 
  /*$(function(){*/
  // マウスオーバー
    /*$('a.hover').mouseover(function(){
    $('embed').remove();
    $('body').append('<embed src="hover.wav" autostart="true" hidden="true" loop="false">');
    });
  });*/
  
  $("#header .rss").hover(function(){
	  $(this).animate({top: "10px"}, "fast");}, function() {
    $(this).css("top","-36px");
  });
  $("#header .twitterFollow").hover(function(){
	  $(this).animate({top: "10px"}, "fast");}, function() {
    $(this).css("top","-36px");
  });
  
  $('#hatena').socialbutton('hatena', {
        button: 'vertical'
    });
	$('#twitter').socialbutton('twitter', {
		button: 'vertical',
	});
	
	$('#evernote').socialbutton('evernote', {
button: 'article-clipper-vert',
styling: 'full'
});
	
	$('#google_plusone').socialbutton('google_plusone', {
		lang: 'ja',
		size: 'tall'
	});

	$('#facebook').socialbutton('facebook_like', {
		button: 'box_count'
	});
	$('#facebook_share').socialbutton('facebook_share', {
		button: 'box_count'
	});
	
});
