$(function(){
        $("ul.sf-menu").supersubs({ 
            minWidth:    5,   // minimum width of sub-menus in em units 
            maxWidth:    27,   // maximum width of sub-menus in em units 
            extraWidth:  1     // extra width can ensure lines don't sometimes turn over 
                               // due to slight rounding differences and font-family 
        }).superfish();

    $('.slideshow').cycle({
		fx: 'fade',
		speed: 8000,
		pause: 1,
		random: 1
 
    });
var windowHeight = $(window).height();
var windowWidth = $(window).width();
var headerHeight = $("#header").height();
var footerHeight = $("#footer").height();
var adjustedwindowHeight = windowHeight-headerHeight-footerHeight;
var actualContentHeight = $("#content").height();


/************Content-Right Width Code Start**********************/

//Set content-right width
$("#content-right").width($(window).width()-262);

$(window).resize(function(){

$("#content-right").width($(window).width()-262);

});

/***********Content-Right Width Code End************************/


/*****************Min-Width Nav*********************************/

var navWidth = 0;
$("#nav li").each(function(){
navWidth += $(this).width()+2;
});
$("#nav").width(navWidth);

/*****************Min-Width Nav End*****************************/

/****************iframe Code Start******************************/

$(window).resize(function(){
windowHeight = $(window).height();
windowWidth = $(window).width();
headerHeight = $("#header").height();
footerHeight = $("#footer").height();
adjustedwindowHeight = windowHeight-headerHeight-footerHeight;
$(".iframe").height(adjustedwindowHeight);
$(".iframe").width(windowWidth);
$("#content").height(adjustedwindowHeight);
});

$(".iframe").height(adjustedwindowHeight);
$(".iframe").width(windowWidth);
$("#content").height(adjustedwindowHeight);

$(".iframe").load(function(){
$(".iframe").height(adjustedwindowHeight);
$(".iframe").width(windowWidth);
$("#content").height(adjustedwindowHeight);
});
/*****************iframe Code End*******************************/


/*****************Sidebar Height*******************************/
var sidebarCommentsHeight = 0;
$("#rcomments p").each(function(){

if($(this).height()>sidebarCommentsHeight){
  sidebarCommentsHeight = $(this).height();

}
});
$("#rcomments").height(sidebarCommentsHeight+20);

if(actualContentHeight>$("#content-left-content").height()){
$("#content-left-content").height(actualContentHeight+20);
}else{
$("#content-left-content").height(adjustedwindowHeight-30);
}





});