/*
 * My JQuery script
 * powered by jQuery (http://www.jquery.com)
 * author: Ben Moll (http://www.bwave.us) 
 */
 
$(document).ready(function(){
		$('.photoshop').animate({ marginLeft: '-1.7%' }, 5000 );
		$('.illustrator').animate({ marginLeft: '-12.1%' }, 5000 );
		$('.ind').animate({ marginLeft: '-1.9%' }, 5000 );
		$('.html').animate({ marginLeft: '-4.0%' }, 5000 );
		$('.wp').animate({ marginLeft: '-7.5%' }, 5000 );
		$('.php').animate({ marginLeft: '-13.2%' }, 5000 );
		$('.seo').animate({ marginLeft: '-6.5%' }, 5000 );
		$('.sea').animate({ marginLeft: '-1.0%' }, 5000 );
		
		$('ul.graphics li').mouseover(function(){
			$(this).css({'background-color' : '#3db6c1'});
		});
		$('ul.graphics li').mouseout(function(){
			$(this).css({'background-color' : '#11ADBC'});
		});
		
		$('.button-next, .button-prev').mouseover(function(){
			$(this).css({'background-color' : 'rgba(155, 151, 109, 0.3)'});
		});
		$('.button-next, .button-prev').mouseout(function(){
			$(this).css({'background-color' : 'rgba(155, 151, 109, 0.1)'});
		});
		
		$('#content .img-border img, #sub-content img, #slideshow').mouseover(function(){
			$(this).css({'-moz-box-shadow' : '0px 0px 10px #333333'}).css({'-webkit-box-shadow' : '0px 0px 10px #333333'}).css({'box-shadow' : '0px 0px 10px #333333'})
		});
		$('#content .img-border img, #sub-content img, #slideshow').mouseout(function(){
			$(this).css({'-moz-box-shadow' : '0px 0px 2px #333333'}).css({'-webkit-box-shadow' : '0px 0px 2px #333333'}).css({'box-shadow' : '0px 0px 2px #333333'})
		});
		
		$('#slideshow').cycle({ 
			fx: 'fade', 
			timeout:  0, 
			speed:    "2000", 
			prev:    '#prev', 
			next:    '#next, #slideshow',  
			after:     onAfter,
   		    cleartypeNoBg: true
		});
		
		function onAfter(curr,next,opts) {
			var caption = "figure " + (opts.currSlide + 1) + " of " + opts.slideCount + "";
			$('#counter').html(caption);
		}
	});
