function beforeScroll () 
	{
		var myLIs = $("div#carousel-container ul li");
		var myImgHeight;

		$.each(myLIs, function(){
			myImgHeight = $(this).children("img").height();
			$(this).animate({
				height: myImgHeight
			}, "fast");
		});
	}
function afterScroll (cur) 
	{
		if(cur)
		{
			var imgHeight = $(cur).children("img").height();
			var container = $(cur).children(".info-container").height();
			container += imgHeight+110;
			
			$(cur).animate({
				height: container
			});
			
		}
	}
function expandAbout (e) 
	{
		$(".aboutmedesc").slideUp();
		var target = e.target;
		var myNext = $(target).next(".aboutmedesc");
		if($(myNext).is(":visible"))
			{
				$(myNext).slideUp();
			}
		else
			{
				$(myNext).slideDown();
			}
	}

function aTarg()
	{
		$("a.viewsite, .aboutmedesc a").attr("target", "_blank");
	}

$(function() {
	$("div#carousel-container").jCarouselLite({
			btnNext: ".scrollRight",
			btnPrev: ".scrollLeft",
			visible: 1,
			beforeStart: beforeScroll,
			afterEnd: afterScroll
	});
	$("div.aboutmedesc").hide();
	$("a.expand").click(expandAbout);
	aTarg();
});
