var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
try {
	var pageTracker = _gat._getTracker("UA-4295215-1");
	pageTracker._trackPageview();
} catch(err) {}

$(document).ready(function() {
	
Cufon.replace('h2');

$('.slideshow').cycle({ 
    fx:     'fade', 
    speed:  '1000',
    timeout: 0, 
    next:   '.next',
    prev:   '.prev',
	after: onAfter
});

$('.button-list a')
.css( {backgroundPosition: "-5 0"} )
.mouseover(function(){
	$(this).find(".arrow-button").stop().animate(
		{backgroundPosition:"(0 0)"}, 
		{duration:150})
	})
.mouseout(function(){
	$(this).find(".arrow-button").stop().animate(
		{backgroundPosition:"(-5 0)"}, 
		{duration:150})
	})
	
	
$('.portfolio-item')				
.mouseover(function(){
	$(this).find('.fade').stop().animate(
		{opacity:1}, 
		{duration:150})
	})
.mouseout(function(){
	$(this).find('.fade').stop().animate(
		{opacity:0}, 
		{duration:150})
	})
	
});

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