  jQuery(document).ready(function() {
 
    jQuery(".news-latest-container").accordion({
    collapsible:true,
    active:false,
    autoHeight: false
    
    });
    jQuery(".closeButton").live("click",function(){
       jQuery(".news-latest-container").accordion("activate",false);
    });
    
    
    	jQuery(".fbfancybox").fancybox({
		'height': 258,
		'width' : 292,
				'transitionIn'	:	'elastic',
		    'transitionOut'	:	'elastic',
				'autoScale'			: false,
				'type'				: 'iframe',
				'overlayOpacity' : 0.35,
				'centerOnScroll' : true,
				'overlayColor' : '#000'
				
			});
  });
 
  
  
  
  
  
  
  jQuery(function() {
  if (jQuery("#sidebarinfobox").length > 0){
            var offset = jQuery("#sidebarinfobox").offset();
            var bodyheight= jQuery(window).height() ;          
            var topPadding = bodyheight / 2 -80;
            jQuery("#sidebarinfobox").css('margin-top', topPadding);
                    
            jQuery(window).scroll(function() {
                if (jQuery(window).scrollTop() > offset.top) {
                    jQuery("#sidebarinfobox").stop().animate({
                        marginTop: jQuery(window).scrollTop() - offset.top + topPadding
                    });
                } else {
                    jQuery("#sidebarinfobox").stop().animate({
                        marginTop: topPadding
                    });
                }
            });
            }
        });
