/* Author: Andreas Philippi - Cubus Arts

*/

jQuery(document).ready(function() {
  
  //some adjustments
  //top menu
  var margin_top = (jQuery('header #top_menu ul').parent().height() - jQuery('header #top_menu ul').height())/2 + jQuery('#top_tape').height()/2 -4;

  jQuery('header #top_menu ul').css('margin-top', margin_top+"px");
  jQuery('header #top_menu ul').show();

  if (jQuery.trim(jQuery('#border_content').text()) != ''){
    jQuery('#border_content').show();
    jQuery('#border_content marquee').marquee();
  }
  
  positionFooter();
  maskRightBorderPartially();

});

jQuery(window).resize(function() {  
  positionFooter();
  maskRightBorderPartially();
});

function maskRightBorderPartially(){
  if (jQuery('#custom_mask_div_1').length>0) {jQuery('#custom_mask_div_1').remove();}
  
  var bg_col = jQuery('body').css('background-color');
  var height = jQuery('#right_col').height()+"px";
  var top = jQuery('#right_col').position().top+"px";
  var left = (jQuery('#right_col').width() + jQuery('#right_col').position().left)+"px";
  
  jQuery('body').append('<div id="custom_mask_div_1" style="position:absolute; background-color:'+bg_col+'; height:'+height+'; top:'+top+'; left:'+left+'; width:1px;"></div>')
};

function positionFooter(){
  var viewportHeight = window.innerHeight ? window.innerHeight : jQuery(window).height();
  if (viewportHeight-230 > parseInt(jQuery('#left_col').css("min-height"))){
    jQuery('#left_col').css("height", (viewportHeight-230)+"px");
  }
  
  jQuery('footer').show();
  jQuery('#html_bg_element_2').show();
}























