$(window).load( function() {
  	$("#thumbnails").fadeIn('fast');
 });

$(document).ready(function() {
 
// put all your jQuery goodness in here.

// Catalog zoom

	var options = {
    zoomWidth: 380,
    zoomHeight: 300,
    xOffset: 59,
    yOffset: 1,
    title: false,
    preloadText: '',
    showEffect: "fadein",
    hideEffect: "fadeout",
    fadeoutSpeed: "fast",
		position: "left" //and MORE OPTIONS
	};
	
 $('.catalog-zoom').jqzoom(options);
 
 	var options = {
    zoomWidth: 440,
    zoomHeight: 300,
    xOffset: 59,
    yOffset: 1,
    title: false,
    preloadText: '',
    showEffect: "fadein",
    hideEffect: "fadeout",
    fadeoutSpeed: "fast",
		position: "left" //and MORE OPTIONS
	};
	
 $('.which-zoom').jqzoom(options);
 
 	var options = {
    zoomWidth: 190,
    zoomHeight: 190,
    xOffset: 37,
    yOffset: 1,
    title: false,
    preloadText: '',
    showEffect: "fadein",
    hideEffect: "fadeout",
    fadeoutSpeed: "fast",
		position: "right" //and MORE OPTIONS
	};
	
 $('.dogs-zoom').jqzoom(options);

 $('.taxonomy #cio-folio-image').cycle({  
    fx: 'fade', 
    speedIn: 'fast', //of the transition
    speedOut: 'fast',
    timeout: 0,
    next: '.next',  
    prev: '.prev',
    pager:  '#thumbnails', 
     
    // callback fn that creates a thumbnail to use as pager anchor 
    pagerAnchorBuilder: function(idx, slide) { 
    		var thumb = jQuery(slide).find(".entry-thumbnail").html();
        	return '<a class="thumbnail" href="#">' + thumb + '</a>';
    }
  });
  

  $('.catalog-exhibition #cio-folio-image, .dogs-about #cio-folio-image, .studio #cio-folio-image').cycle({  
	    fx: 'fade', 
	    speedIn: 'fast', //of the transition
	    speedOut: 'fast',
	    timeout: 0,
	    next: '.next',  
	    prev: '.prev',
	    after: onAfter
  });
  
  $('.home #cio-folio-image').cycle({  
	    fx: 'fade', 
	    speedIn: 'fast', //of the transition
	    speedOut: 'fast',
	    timeout: 5000,
	    next: '.next',  
	    prev: '.prev',
	    after: onAfter
  });
  
  function onAfter(curr,next,opts) {
		 var msg = (opts.currSlide + 1) + ' / ' + opts.slideCount;
		 $('.pager').fadeIn('fast');
		 $('.nav').html(msg);
	 }; 
  
 });
 

  
  


