// Featured Locations box code
function mediaCenter(thisname, container, xmlurl)
{
	container = "." + container;
	var entryHeight = 125;
	
	$.get(xmlurl, function(d) {
		
		var i = 0;
		
		$(d).find('item').each(function() {
		
			var $item = $(this);
			var title = $item.attr('title');
			var desc = $item.attr('desc');
			var linkURL = $item.attr('link');
			var img = $item.attr('img');
			//$item.find('title').text();
			
			$(container).append('<div class="mediaCenterEntry"><img src="' + img + '" /><h1>' + title + '</h1><p>' + desc + '</p></div>');
			
			$(container + " .mediaCenterEntry:last").click(function(event){
				 event.preventDefault();
				 var localLink = linkURL;
				 window.location = linkURL;
			});
			
			i++;
		});
		
		var newHeight = (i+1) * entryHeight;		
		$(container).jScrollPane({height:newHeight, dragMaxHeight: 87, dragMinHeight: 87, scrollbarWidth: 34, scrollbarMargin: 10, animateTo: true, showArrows: true});

		
	});
	
	var goBack = function(num)
	{
		if(num == 2)
		{
			$('.slider').stop().animate(
				{marginLeft: -colWidth},
				{duration: 500,
				easing: "easeOutExpo"
			});
		}
		else if(num == 1)
		{
			$('.slider').stop().animate(
				{marginLeft: 0},
				{duration: 500,
				easing: "easeOutExpo"
			});
		}
	}
	
	this.getDisciplines = function(num)
	{
		$('.slider').stop().animate(
			{marginLeft: -colWidth},
			{duration: 500,
			easing: "easeOutExpo"
		});	
		
		$('.col2').stop().animate(
			{marginTop: -(num * colHeight)},
			{duration: 0
		});		
	}
	
	this.getFullInfo = function(num)
	{
		$('.slider').stop().animate(
			{marginLeft: -(colWidth * 2)},
			{duration: 500,
			easing: "easeOutExpo"
		});	
		
		$('.col3').stop().animate(
			{marginTop: -(num * colHeight)},
			{duration: 0
		});		
	}

}


