/*! jQuery cycle plugin config for works slideshow */

jQuery.fn.outerHTML = function() {
    return $('<div>').append(this.eq(0).clone()).html();
};

$(document).ready(function() {
    $('.works').each(function(index) {
        $(this).cycle({
			fx:     'fade',
		    timeout: 0,
			pager:  '#slideshow-pager',
			activePagerClass: 'active-slide',
			pagerAnchorBuilder: function(i) {
				if (index == 0)
					// for first slideshow, return a new anchro
					return '<a href="#">'+(i+1)+'</a>';
				// for 2nd slideshow, select the anchor created previously
				return '#slideshow-pager a:eq('+i+')';
        	}
		});
    });
});
