// image swap
function initRollOverImages() {
  var image_cache = new Object();
  $("img.rollover").each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_ovr = this.src.substr(0, dot) + '-ovr' + this.src.substr(dot, 4);
    image_cache[this.src] = new Image();
    image_cache[this.src].src = imgsrc_ovr;
    $(this).hover(
      function() { this.src = imgsrc_ovr; },
      function() { this.src = imgsrc; });
  });
}
$(document).ready(initRollOverImages);


// blank
$(function(){
  $(".blank").click(function(){
    this.target = "_blank";
  });
});


// top
$(function(){
  $(".top").click(function(){
    this.target = "_top";
  });
});

// fancybox
$(document).ready(function() {

$("a#inline").fancybox({
'zoomSpeedIn': 300,
'zoomSpeedOut': 300,
'frameWidth': 720,
'frameHeight': 640,
'overlayShow': true,
'hideOnContentClick': false,
'centerOnScroll': true,
'zoomOpacity': true,
'callbackOnClose': function() {
location.href = location.href; 
}

  });
});
