jQuery(document).ready(function($) {
		$(document).ready(function() {
		
			$(function() {
				var index = 0, hash = window.location.hash;
				if (hash) {
				index = /\d+/.exec(hash)[0];
				index = (parseInt(index) || 1) - 1; // slides are zero-based
			}
		
		$('.portfolio-slideshow').each(function() {
				var p = this.parentNode;
				$(this).cycle({
					fx: 'fade',
					speed: 1000,
					timeout: 4000,
					next: $('.slideshow-next', p),
					startingSlide: index,
					prev: $('.slideshow-prev', p),
					pager:  '#slides',
					pagerAnchorBuilder: function(idx, slide) {
					// return sel string for existing anchor
					return '#slides li:eq(' + (idx) + ') a'; }
				});
			});
		});

	$('.pause').click(function() { 
		$('.portfolio-slideshow').cycle('toggle'); 
	});
	
		}); });

