


function initRollOverImages() {
  var image_cache = new Object();
  $("img.swap").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_over' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_on;
    $(this).hover(
      function() { this.src = imgsrc_on; },
      function() { this.src = imgsrc; });
  });
}

$(document).ready(initRollOverImages);



$(document).ready(function(){  
$("img.hover").fadeTo(0,1.0);  
$("img.hover").hover(function(){  
        $(this).fadeTo(400,0.85);  
    },  
    function(){  
        $(this).fadeTo(300,1.0);  
    });  
});  



$(document).ready(function(){  
$("img.hover2").fadeTo(0,1.0);  
$("img.hover2").hover(function(){  
        $(this).fadeTo(300,0.70);  
    },  
    function(){  
        $(this).fadeTo(300,1.0);  
    });  
});



 /*画像＆テキストランダム取得*/

i=Math.floor(Math.random()*3); /*0〜1までのランダム変数取得*/

function setimage(){
  if(i==0)      document.write('<img src="http://www.lapis-salon.com/wp-content/themes/aplan/img/top_00.jpg" alt="" title="" />');
  else if(i==1) document.write('<img src="http://www.lapis-salon.com/wp-content/themes/aplan/img/top_01.jpg" alt="" title="" />');
  else if(i==2) document.write('<img src="http://www.lapis-salon.com/wp-content/themes/aplan/img/top_02.jpg" alt="" title="" />');

}
