function addCycling(selector, elements, settings, isFile) {
	var opts = jQuery.extend({}, { fx: 'fade' }, settings);
	var $cycling = jQuery(selector);
	var tempHTML = '';
	var $img = '';
	var imgDir = '';
	var imgAlt = '';
	var imgTitle = '';
	
	// If it's a file (img) get the existing img info
	if (isFile) {
		$img = jQuery('img', $cycling);
		
		// Get the image attributes
		imgDir = $img.attr('src');
		imgAlt = $img.attr('alt');
		imgTitle = $img.attr('title');
		
		// Remove the img name from the directory
		imgDir = imgDir.slice(0, imgDir.lastIndexOf('/'));
	} // if
	
	// Generate and replace the contents of the selector
	for (var i = 0; i < elements.length; i++) {
		if(isFile) {
			tempHTML += '<img src="' + imgDir + '/' + elements[i] + '" alt="' + imgAlt + '" title="' + imgTitle + '" />';
		} else {
			tempHTML += '<div class="item">' + elements[i] + '</div>';
		} // if
	} // for
	
	$cycling.html(jQuery(tempHTML));
	
	// Find the navigation links
	$cycling.cycle(opts);
}
