$(document).ready(function() {
	$('.set1').randomImage({path: 'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/trevorwaynes/'});
	$('.set2').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/fischeliebe/'});
	$('.set3').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/missmichief/'});
	$('.set4').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/maxlver/'});
	$('.set5').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/edithlebeau/'});
	$('.set6').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/lauradark/'});
	$('.set7').randomImage({path: 'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/blacklotusclothing/'});
	$('.set8').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/fablefury/'});
	$('.set9').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/hmslatex/'});
	$('.set10').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/delphineayache/'});
	$('.set11').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/jessicawalker/'});
	$('.set12').randomImage({path:'http://www.darkbeautymag.com/wp-content/uploads/2011/02/splash/silentview/'});
    $('.slideshow').each(function(index) {
        $(this).cycle({
			fx:     'fade',
			timeout: 5000,
			pauseOnPagerHover:   1,
			speed:   250,
			sync:    false,
			pager:  '#nav',
			after:   onAfter,
			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 '#nav a:eq('+i+')';
        	}
		});
    });
    $('#feature_list_img').cycle({
        fx:     'fade',
        speed:  'fast',
        timeout: 0,
        pager:  '#feature_list_nav',
		pauseOnPagerHover:   1,
		pagerEvent: 'mouseover',
        pagerAnchorBuilder: function(idx, slide) {
            // return sel string for existing anchor
           // return '#feature_list_nav li:eq(' + (idx) + ') a';
        }
    });
	$(".preview").colorbox({innerWidth:"686px", innerHeight:"520px", iframe:true });
});
function onAfter() {
    $('#output').html('<div>' + this.title + '</div>');
}
