
$(document).ready(function(){

// init for tooltip js

  $('#pics, #pics-auto').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    showBody: " - ", 
    extraClass: "pretty1", 
    fixPNG: true,
    left: -46,
    top: -50
 	});



 	$('.tooltip-grid').tooltip({ 
    track: true, 
    delay: 0, 
    showURL: false, 
    showBody: " - ", 
    extraClass: "pretty2", 
    fixPNG: true,
    left: -46,
    top: -50
 	});


// init for the cycle js

	$('#pics').cycle({
  	fx:'fade', 
  	speed:'2000', 
  	timeout: 0, 
  	next:'#next, #pics',
  	prev:'#prev',
  	after: onAfter
  	})
  	.css('cursor', 'pointer');

  // counter
  function onAfter(curr,next,opts) {
  	var caption = (opts.currSlide + 1) + ' of ' + opts.slideCount + ' images';
  	$('#caption').html(caption);
  	}

// init for the home cycle js

	$('#pics-auto').cycle({
	fx:'fade', 
	speed:'500', 
    timeout:  4000, 
	next:'#pics-auto'
  	})
  	.css('cursor', 'pointer');

  // counter
  function onAfter(curr,next,opts) {
  	var caption = (opts.currSlide + 1) + ' of ' + opts.slideCount + ' images';
  	$('#caption').html(caption);
  	}

  // nifty rollovers
	$(function() {
		$('.portfolio-thumb').hover(function(){
			$(this).find('div').fadeIn("fast");
		}, function(){
			$(this).find('div').fadeOut("slow");
		});
	});


});

	