$(document).ready(function() {

  /* Open External Links in New Window */
	$("a[rel=external]").attr("target","_blank");
	
	/* Home Slideshow */
	$("ul#home-slideshow").cycle({ 
    speed: 4000
  });
  $("ul#home-slideshow") 
    .after("<div id='home-slideshow-navigation'></div>")
    .cycle({
      fx: "fade",
      speed: 600,
      timeout: 4000,
      delay: 5000,
      pause: 1,
      fit: 0,
      pauseOnPagerHover: 1,
      pager: "#home-slideshow-navigation",
      activePagerClass: "current"
    });

	/* Find Location */
	$("form#find-office select").change(function() {
    var office = $(this).find("option:selected").attr("value");
    $(this).parent().parent().attr("action", '/contact/'+office+'/');
  });
	
});// JavaScript Document
