$(function() {
  $("a[rel='colorbox']").colorbox({slideshow:true}); 
  $("a[rel='colorbox_thumb']").colorbox();  
  $("a[rel='colorbox_bottom_thumb']").colorbox({slideshow:true});   
});

$(document).ready(function(){
  var main_height  = $('.maincontent').height();
  var right_height = $('.rightbar').height(); 
  var right_width = $('.rightbar').width(); 
  
  if (right_width > 0) {
    /* size both elements same height */
    if (right_height > main_height) {
     	$('.maincontent').height(right_height);
    } else {
    	$('.rightbar').height(main_height);
    }
  }

  $(".maincontent").dropShadow(); 
  $(".rightbar").dropShadow();
  $("#header").dropShadow();  
  
  $('#thumbs').cycle({
		fx: 'fade'
	});   
});

function autoIframe(frameId){
  try {
    frame       = document.getElementById(frameId);
    innerDoc    = (frame.contentDocument) ? frame.contentDocument : frame.contentWindow.document;
    heightToSet = innerDoc.body.scrollHeight + 40;

    $('#mainIframe').height(heightToSet);
    $('#mainwrap').height(heightToSet);
  } catch(err){
    window.status = err.message;
  }
}

