var $j = jQuery.noConflict();   

$j(document).ready(function(){

function AfterResize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  $j('#horizontally_center').height(myHeight);
}

if($j('.post_content').length > 0)
{
  if($j(this).attr('id', 'category_news'))
  {// We go to the news post form New Page
    $j("#menu .page-item-14").addClass('current_page_item');
    // We need to regenerate font
    Cufon.replace('#menu li a', { fontFamily: 'bellerose', hover: true });
  }
}

if($j('#horizontally_center').length > 0)
{
  var resizeTimer = null;
  $j(window).bind('resize', function() {
    if (resizeTimer) clearTimeout(resizeTimer);
    resizeTimer = setTimeout(AfterResize, 0);
  });
  
  AfterResize();  
}
}); 
