function swapimg(obj) {
  if(obj.src.match(/_f2.(jpg|gif|png)/)) {
    obj.src = obj.src.replace('_f2', '');
  } else {
    obj.src = obj.src.replace(/\.(jpg|gif|png)$/, "_f2.$1");
  }
}

$(document).ready(function(){
  $(".CPClose1").click(
    function(){
      $(this).parent().parent().parent().parent().fadeOut(500);
    }
  );
  $(".LS1CU1 li").each(function(){
    var ttl = $(this).attr("title");
    $(this).mousedown(
      function(){
        $(".SDTooltip1").fadeOut(50);
        $("#SDTooltip" + ttl).fadeIn(300);
      }
    );
  });
  
  $('.LFCD1CP1').vTicker();
  
  $("#CUItem1 li img").mouseover(function() {
    var rep_img = $(this).attr("src");
    $("#CUItem1 li img").css("opacity","1");
    $(this).css("opacity","0.6");
    $("#CPItem4 img").attr("src", rep_img);
  });

  $(".CDPaging1 img").filter(function(){
    return this.title && this.title.length>0;
  }).each(function(){

  var self = $(this), title = self.attr("title");
  self.hover(
    function(e){
      self.attr("title","");
        $("body").append("<div id='JD1'>"+title+"</div>");
        $("#JD1").css({
          position: "absolute",
          top: e.pageY+(-35), 
          left: e.pageX+10
        });
      },
    function(){
      self.attr("title",title);
        $("#JD1").hide().remove();
      }
    );
    self.mousemove(function(e){
      $("#JD1").css({
        top: e.pageY+(-35),
            left: e.pageX+10
      });    
    });
  });
});
