
// AJAX enable in-line gallery module
jQuery(function($){
	$('.moduleType_Images:has(.type-inline)').each(function(index,section){ // all inline sections
		$('.gallerylist li a',section).click(function(){
			thumbpath = $('img',this).attr('src');
			imgID = thumbpath.substring(thumbpath.lastIndexOf("_")+1);
			imgID = imgID.substring(0,imgID.indexOf('.'));
			//console.log(imgID);
			$('.image-inline',section).attr('src','/UserFiles/Image/images_full_'+imgID+'.jpg')
			$('.image-inline',section).attr('alt',$('img',this).attr('alt'))
			$('.gallerylist li.selected',section).removeClass('selected');
			$(this).parent().addClass('selected');
			
			$('.image-description',section).load($(this).attr('href')+' #'+$(section).attr('id')+' .image-description *' );
			if((typeof pageTracker)!="undefined")
			{
				// don't neglect analytics!
				pageTracker._trackPageview($(this).attr('href'));
			}
			return false;
		});
	})
});


jQuery(function($){
    $('#sectionId_10 ul').cycle({
		fx: 'fade',
		speed: 3000,
		timeout: 7000,
		random: 1,
		height: 316
	});
});
