//Analytics


// メニューロールオーバー

$(function(){

	$("img.rollover").mouseover(function(){

		$(this).attr("src",$(this).attr("src").replace(/^(.+)(\.[a-z]+)$/, "$1_on$2"));

	}).mouseout(function(){

		$(this).attr("src",$(this).attr("src").replace(/^(.+)_on(\.[a-z]+)$/, "$1$2"));

	});

});


//ページトップ

$(function(){
     $("#toTop a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});


//ページトップ(ページの間に使用する時など)

$(function(){
     $("#toTop2 a").click(function(){
     $('html,body').animate({ scrollTop: $($(this).attr("href")).offset().top }, 'slow','swing');
     return false;
     })
});



// RSS取得

$(document).ready(function(){

  

  $('#txtUrl').val('http://rss.cnn.com/rss/edition.rss');

  $('#txtCount').val('5');

  $('#chkDate').attr('checked','checked');

  $('#chkDesc').attr('checked','checked');

  

 // 各種設定　URL　記事数　本文一部有無　記事日時 

   $('#divRss').FeedEk({

   FeedUrl : 'http://shiny115.ti-da.net/index.rdf',


   MaxCount : 3,

   ShowDesc : true,

   ShowPubDate: true

  });

  

});



function OpenBox()

{

$('#divSrc').toggle();

}

function changeFeedUrl()

{

var cnt= 5;

var showDate=new Boolean();

showDate=true;



var showDescription=new Boolean();

showDescription=true;



if($('#txtCount').val()!="") cnt=parseInt($('#txtCount').val());

if (! $('#chkDate').attr('checked')) showDate=false;

if (! $('#chkDesc').attr('checked')) showDescription=false;



 $('#divRss').FeedEk({

   FeedUrl : $('#txtUrl').val(),

   MaxCount : cnt,

   ShowDesc : showDescription,

   ShowPubDate: showDate

  });

}
