$(document).ready(function() {
//var img = $("li img").attr('src');
//$("li img").hide();
//$("li img").parent("div").css('background', "url('" + img + "')");

 $(".portfolio").jCarouselLite({
	btnNext: ".next",
    btnPrev: ".prev",
    visible: 1,	
    auto: 3000,		
    speed: 400
 });

});

$(window).load(function() {
// height + padding + borders
var mainOuterHeight = $('#main').eq(0).outerHeight();
var sidebarOuterHeight = $('#sidebar').eq(0).outerHeight();

// height
var sidebarHeight = $('#sidebar').eq(0).height(); 
var mainHeight = $('#main').eq(0).height();

// if sidebar is smaller	
if (mainOuterHeight > sidebarOuterHeight) {
    // calculate padding
    var padding = sidebarOuterHeight - sidebarHeight;
    // calculate new height
    var height = mainOuterHeight - padding;
    // set height
    $('#sidebar').css('height',  height ); 
}

// if sidebar is bigger
if (mainOuterHeight < sidebarOuterHeight) {
    // calculate padding
    var padding = mainOuterHeight - mainHeight;
    // calculate new height
    var height = sidebarOuterHeight - padding;
    // set new height
    $('#main').css('height', height );
}
});
