// this snippet removes the link from the 'image cycle' image and moves it to the caption, and adds the 'mehr...' text.
jQuery(document).ready(function() {
	jQuery('#content .tx-imagecycle-pi1 li').each(function(index, element) {
		jQuery(this).find('img')
			.removeAttr('longdesc')
			.attr('alt', '')
			.removeAttr('title');
		if (jQuery('a', this).size() > 0) {
			/* if there is no link, don't unwrap and re-add */
			var link = jQuery('a', this).attr('href');
			jQuery(this).find('img').unwrap()
				.end()
				.find('span')
					.wrap('<a href="' + link + '"></a>')
					.append('<p>mehr &raquo;</p>');
		}
	});
	jQuery('#content div.tx-imagecycle-pi1').append('<div class="imagecycle_nav"></div>');
	jQuery('div.imagecycle_nav')
		.append('<div id="imagecycle_prev">&laquo;</div')
		.append('<div id="imagecycle_pause">||</div>')
		.append('<div id="imagecycle_play">&gt;</div>')
		.append('<div id="imagecycle_next">&raquo;</div')
		.show().find('#imagecycle_play').hide();
		
	jQuery('#imagecycle_pause').click(function() { 
	    jQuery('#content .tx-imagecycle-pi1 ul')
			.cycle('pause');
		jQuery('#imagecycle_pause').hide();
		jQuery('#imagecycle_play').show();
	});
	jQuery('#imagecycle_play').click(function() { 
	    jQuery('#content .tx-imagecycle-pi1 ul')
			.cycle('resume');
		jQuery('#imagecycle_play').hide();
		jQuery('#imagecycle_pause').show();
	});
});

