$(function(){
    $('ul.menu').superfish({
        delay		: 100,
        speed		: 0.5,
        animation : { opacity:"show",height:"show"},
        oldJquery	: true
    }).find('ul').bgIframe({opacity:false});
    $('.action').bind('click', function(){
       $(this).parent('.faq').find('.answer').toggle();
    });
    $('#footer ul li:first').css('border', 'none');
	$('#p1').autotab({ target: 'p2', format: 'numeric'});
    $('#p2').autotab({ target: 'p3', format: 'numeric', previous: 'p1' });
    $('#p3').autotab({ target: 'email', format: 'numeric', previous: 'p2' });
    setTimeout('sameHeight()', 100);
    sameHeight();
    $('img').bind('load', function(){
       setTimeout('sameHeight()', 100);
       sameHeight();
    });
});

function sameHeight(){
    $('#post').height() < $('#video').height() ? $('#post').height($('#video').height()) : $('#video').height($('#post').height());
    $('#post').height() < $('#sidebar').height() ? $('#post').height($('#sidebar').height()) : $('#sidebar').height($('#post').height());
    var t1;
    var t2;
    t1 = $('#box_left').height() > $('#box_center').height() ? $('#box_left').height() : $('#box_center').height();
    t2 = t1 > $('#box_right').height() ? t1 : $('#box_right').height();
    $('#box_left').height(t2);
    $('#box_center .inside').height(t2-30);
    $('#box_right .inside').height(t2-30);
}