// JavaScript Document
var $j = jQuery.noConflict();

		function equalHeight(group) {
			tallest = 0;
			group.each(function() {
				thisHeight = $j(this).height();
				if(thisHeight > tallest) {
					tallest = thisHeight;
				}
			});
			group.height(tallest);
		}
		
        function rotateImages() {
            var oCurPhoto = $j('#slideshow a.current');
            var oNxtPhoto = oCurPhoto.next();
            if (oNxtPhoto.length == 0){
                oNxtPhoto = $j('#slideshow a:first');
			}
            oCurPhoto.animate({ top: "-185px" },400,
				function() {
					oCurPhoto.removeAttr('style');
					oCurPhoto.removeClass('current');
				});
			oNxtPhoto.animate({ top: "0px" }, 500,
                function() {
                    oNxtPhoto.addClass('current');
                });
        }
		
$j(function() {
	equalHeight($j(".equal"));	
	setInterval("rotateImages()", 6000);
	$j(".popupwindow").popupwindow();
});
