$(document).ready(function(){

	// =====================================================================================
	// App wide
	// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
  $("a.rollover").hover(
    function() {
      curr = $(this).find("img").attr("src");
      overlen = curr.length;
      over = curr.substr(0, overlen-4);
      over = over+'_on.png';
      $(this).find("img").attr({ src: over });
    },
    function() {
      $(this).find("img").attr({ src: curr });
    }
  );
  // Rollovers - Preload images
  $("a.rollover").find("img").each(function(i){
    temp = this.src;
    prelen = temp.length;
    pre = temp.substr(0, prelen-4);
    pre = pre+'_on.png';
    preload_image_object = new Image();
    preload_image_object.src = pre;
  });

	// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	// perform JavaScript after the document is scriptable.
	// $(function() {
		// setup ul.tabs to work as tabs for each div directly under div.panes
		$("ul.tabs").tabs("div.panes > div");
	// });

	// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
	// Slideshow
	$('div#slideshowPics').cycle({ 
	    fx: 'fade', 
			speed: 2500,     
			pause: 1,
	 		random: 1
	});

});
