$(function() {
    $('#slideshow').before('<ul id="slideshowNav">').cycle({
        fx:     'fade',
        speed:  '300',
        next:	'#nextLink, #slideshow',
        prev:	'#prevLink',
        timeout: 0,
        pager:  '#slideshowNav',
        pagerAnchorBuilder: function(idx, slide) {
			var imgThumb = slide.src;
			var newSrc = imgThumb.replace('.jpg', '-60x60.jpg');
			
            return '<li><a href="#"><img src="' + newSrc + '" width="60" height="60" /></a></li>';
        }
    });
});

$(function() {
	$("ul#nav li a").not('ul#nav li.current-cat a, ul#nav li.current_page_item a').mouseover(function() {
    	$(this).animate({ color: "#8bb545" }, 200);
    
 	 }).mouseout(function(){
    	$(this).animate({ color: "#fff" }, 200);
 	 });
 });
 
 $(function() {
	$("p#prevnext a, div#footer a").mouseover(function() {
    	$(this).animate({ color: "#8bb545" }, 200);
    
 	 }).mouseout(function(){
    	$(this).animate({ color: "#fff" }, 200);
 	 });
 });
 
 $(function() {
 	$('#supersize').cycle({
 		fx:     'fade',
        speed:  '300',
 		timeout: 5000
 		});
 });
 
   $(document).keydown(function(e){
    switch(e.keyCode){
      case 37:
      $('#slideshow').cycle('prev');
      $('#supersize').cycle('prev');
      break;

      case 39:
      $('#slideshow').cycle('next');
      $('#supersize').cycle('next');
      break;
      }
  });
