jQuery.noConflict();
jQuery(document).ready(function() {
    equalHeight(jQuery(".column"));
		
		//fancybox for rgnewsimages
		if(jQuery('.news-images').length > 0){
        //JQuery workaround writes imagecaption in title tag for fancybox
        jQuery('.rg-news-image').each(function () {
        var caption = jQuery(this).find('.news-image-caption').text();
        jQuery(this).find('a').attr('title',caption);
        jQuery(this).find('img').attr('title',caption);
        jQuery(this).find('img').attr('alt',caption);
      });
			//initialize fancybox for all rg news images
      jQuery('.rg-news-image a').fancybox({
      	overlayShow: true,
      	speedIn : 300,
      	speedOut : 300,
      	'transitionIn'  :  'elastic',
      	'transitionOut'  :  'elastic',          
      	overlayOpacity: 0.75,
      	overlayColor: '#000000',
      	centerOnScroll:  true
      });      	
		}
		
});


/*functions*/
function equalHeight(group) {
    var tallest = 0;
    group.each(function() {
        var thisHeight = jQuery(this).height();
        if(thisHeight > tallest) {
            tallest = thisHeight;
        }
    });
    group.height(tallest);
}
/* optional fixed footer
jQuery(function(){
	positionFooter(); 
	function positionFooter(){
		if(jQuery(document.body).height() < jQuery(window).height()){
			jQuery("#footer").css({position: "absolute",top:($(window).scrollTop()+jQuery(window).height()-jQuery("#footer").height())+"px"})
		}	
	}
 
	jQuery(window)
		.scroll(positionFooter)
		.resize(positionFooter)
});*/


