$.fn.cycle.updateActivePagerLink = function(pager, currSlideIndex) { 
    $(pager).find('li').removeClass('activeLI').filter('li:eq('+currSlideIndex+')').addClass('activeLI'); 
};
$(function(){
  $('#slideshow').after('<ul id="nav">').cycle({
    fx:      'scrollDown',
    speedIn:  350, 
    speedOut: 50, 
    easeIn:  'easeOutExpo', 
    easeOut: 'easeOutExpo', 
    timeout:0,
    pager:      '#nav', 
    pagerEvent: 'mouseover',
    pagerAnchorBuilder: function(idx, slide) { 
//  return selector string for existing anchor 
    return '<li>' + slide.title + '</li>';
  }
  });
  $("#nav li:last-child").css({margin:"0"});
});

$(function(){
  $('ul.roundBox li').hover(function(){
  $(this).animate({
  color:'#ffffff',
  backgroundColor:'#303030'},200);
  },function(){
  $(this).animate({
  color:'#b0b0b0',
  backgroundColor:'#1E1E1E'},400);
  });
  $('ul.roundBox li').corner('6px');
  $('ul.roundBox li:nth-child(3n)').css({marginRight:'0'});
});


$(function(){
  $('#wpRss p:eq(0)').after('<dl class="listStyle01">');
  $('#wpRss dl').append('<dt>RECENT ENTRIES</dt>');
  $.ajax({
    url: '/repair-works/feed',
    cache: false,
    dataType:'xml',
    success: function(xml){
      $(xml).find('item:lt(5)').each(function(){//0〜2番目までの要素を取得
      var title = $(this).find('title').text();
      var url = $(this).find('link').text();
      $('#wpRss dl').append('<dd><a href="'+url+'">'+title+'</a></dd>');
      });
      $("div#wpRss dd a").hover(function(){
      $(this).animate({
      color:"#ffffff",
      backgroundColor:"#222222"},60);
      },function(){
      $(this).animate({
      color:"#b0b0b0",
      backgroundColor:"#141414"},400);
      });
      }
    });
});


