/*rollover images*/
$(function() {
  var image_cache = new Object();
  $('.swap').each(function(i) {
    var imgsrc = this.src;
    var dot = this.src.lastIndexOf('.');
    var imgsrc_on = this.src.substr(0, dot) + '_on' + 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; });
  });
});

/* fade images*/
$(function(){
	$('.fade').hover(
		function() { $(this).stop().fadeTo(240, 0.8);},
		function() { $(this).stop().fadeTo(240, 0.9,function() { $(this).fadeTo(360, 1.0); });}
	);
});

/* GALLERY*/
  $(function(){
    $('#photos').galleryView({
      panel_width: 681,
      panel_height: 300,
      frame_width: 227,
      frame_height: 75
    });
  });


/*color box*/
$(document).ready(function(){
			//Examples of how to assign the ColorBox event to elements
			$("a[rel='guide']").colorbox();
});
