/* ----------------------------------------------------------
	title		  : CP Framework
	created		  : 10/23/08
	last updated  : 10/27/08
	history		  :
---------------------------------------------------------- */
jQuery.noConflict();     
jQuery(document).ready(function($){


//remove default placeholder
$('#feature-content').empty();


//create controls



	//get images
	$.ajax({
		type: "GET",
		url: "/Websites/columbiapetroleum/templates/cpTheme/feature.xml",
		dataType: "xml",
		success: function(xml) {
			$(xml).find('album').each(function(){
				var dirPath = $(this).attr('lgPath');
					
					$(this).find('img').each(function(){
						var imgPath = $(this).attr('src');			
						var linkPath = $(this).attr('link');
						
						
						var newImg = '<img src="' + dirPath + imgPath + '" alt="" />';
						
						if (linkPath == '#' || linkPath == '' || linkPath == null) {
							//do nothing						
							} else {
							var newImg = '<a href="' + linkPath + '">'+ newImg + '</a>';
							}
						
						
						$(newImg).appendTo('#feature-content');
					
					});
			}); 
		
		//rotate
		$('#feature-content').cycle({ 
			fx:     'fade', 
			speed:  'slow', 
			timeout: 5000, 
			pause:   1 
		});
		
		}
	}); 





});//end doc ready


function createWindow(cUrl,cName,cFeatures) {
var xWin = window.open(cUrl,cName,cFeatures)
}
