$(document).ready(function() { // Make sure that side navigation bar stays the same height as main_content. if($('#side-navigation').length && $('#main-content').length) { var longest_column = $('#main-content').height(); var auxiliary_heights = 0; side_nav = parseInt($('#side-navigation').height() + 150); side_content = $('#side-content').height(); if($('.page_header').length) auxiliary_heights += $('.page_header').height(); if($('#category-header').length) auxiliary_heights += $('#category-header').height(); if($('#category-footer').length) auxiliary_heights += $('#category-footer').height(); if($('.page_footer').length) auxiliary_heights += $('.page_footer').height(); if( side_nav > longest_column ) { if( side_nav > side_content ) { longest_column = side_nav; } else { longest_column = side_content; } } $('.side_bar_extension').height(longest_column + auxiliary_heights); } if($('.iframe').length) $(".iframe").fancybox({ 'height': 20, 'width': 250 }); if($('.iframe_video').length) $(".iframe_video").fancybox({'height': 400,'width': 500,'type': 'iframe'}); });