jQuery(document).ready(function() {
		$(".page-item-9 a:first").attr("href","#");
		$(".page-item-26 a:first").attr("href","#");
		$(".page-item-138 a:first").attr("href","#");
		$(".page-item-209 a:first").attr("href","#");
		    $('#slideshow').galleria({
        image_crop: true,
        transition: 'fade',
        data_config: function(img) {
            return {
                description: $(img).next('p').html()
            };
        }
    });
			
	
			$("a[rel^='prettyPhoto']").prettyPhoto({theme:'facebook'});
			
					//	$('#slides a:nth-child(3), #slides a:nth-child(6), #slides a:nth-child(9), #slides a:nth-child(12), #slides a:nth-child(16), #slides a:nth-child(19)').wrap('<div class="unit">');

			var results =[];
                var elements = $("#slides").children('a');
                $.map( elements  , function(i, n){
                        if( n%6 === 0 ){
                                results.push(n);
                        }
                });
                $.each( results , function(i,v){
                        elements.slice(v, v+6).wrapAll('<div class="row"></div>');
                });

				$('#slides').cycle({ 
    fx:     'scrollVert', 
    speed:  'slow', 
	pause:1,
	requeueOnImageNotLoaded:1,
	cleartypeNoBg:   true

	});

	});

    // Classic theme is now loaded using <script> instead
    // You can still use loadTheme if you like, either works.

	$('.headerslide').cycle({
		fx: 'fade'
	});