jQuery.noConflict();
jQuery(document).ready(function($){
	
	$("ul#solutions li").hover(function() {
		var color = "#" + $("a", this).attr('class');
		$("img", this).css('display', 'none');
		$(".rollover", this).css('display', 'block');
		$(this).css('background', color);
	},function() {
		$("img", this).css('display', 'block');
		$(".rollover", this).css('display', 'none');
		$(this).css('background', 'none');
	});

	$.ajaxSetup ({
		// Disable caching of AJAX responses
		cache: false
	});
	
	
	
	$.ajax({
		type: "GET",
		url: "./slideshow.xml",
		dataType: ($.browser.msie) ? "text" : "xml",
		success: function(data) {
			//alert('success');
			var xml;
			
			if (typeof data == "string") {
				xml = new ActiveXObject("Microsoft.XMLDOM");
				xml.async = false;
				xml.loadXML(data);
			} else {
				xml = data;
			}
				
			$(xml).find('slide').each(function(){
				var $myslide = $(this); 
				var number = $myslide.attr('id');
				var slidelink = $myslide.find('slidelink').text(); 
				var imageurl = $myslide.attr('imageurl');	
				var newcontent = '<div class="slides" id="' + number + '" >';
				newcontent += '<a href="'+slidelink+'"><img alt="" src="' + imageurl + '" /></a>';  
				newcontent += '<div style="clear:both;">' + '</div>' + '</div>';
				$('#content').append($(newcontent));
			}); 
			
			$("#content").after('<div id="slide-navigation"></div>').cycle({ 
				fx:'fade', 
				speed: 500,
				force: 1,
				timeout: 5500,
				pause: 1,
				pauseOnPagerHover: 1,
				pager:  '#slide-navigation' 
			});
			
			$("a:contains('HIDDEN')").hide();
		
		} ,
		error: function(){
    		alert('failure');
  		}
	});
	
	
	
});
	
	
	/*$.get('slideshow.xml', function(d){
		$(d).find('slide').each(function(){
			var $myslide = $(this); 
			var number = $myslide.attr('id');
			var slidelink = $myslide.find('slidelink').text(); 
			var imageurl = $myslide.attr('imageurl');	
			var html = '<div class="slides" id="' + number + '" >';
			html += '<a href="'+slidelink+'"><img alt="" src="' + imageurl + '" /></a>';  
			html += '<div style="clear:both;">' + '</div>' + '</div>';
			$('#content').append($(html));
		}); $('#content').after('<div id="slide-navigation">')
			.cycle({ 
				fx:'fade', 
				speed: 500,
				force: 1,
				timeout: 3500,
				pause: 1,
				pauseOnPagerHover: 1,
				pager:  '#slide-navigation' 
			});
		$("a:contains('HIDDEN')").hide();
	});*/
	


