$(document).ready(function(){
    /*setFooterPosition(".footer");
    $(window).resize(function() {
      setFooterPosition(".footer");
    });*/
  $('a.popup:not(.edit)').fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	false
	});
});
function setFooterPosition($footer){
    windowH = jQuery(window).height();
    bodyH = $('.global').height();
    footerH = $($footer).height();
    if(windowH > bodyH){
        $($footer).css('top',windowH - footerH);
    }else {
        $($footer).css('top',bodyH);
    }
    $($footer).css('display','block');
} 
