/* Main javascript file for abacusaccounting.co.uk
 * @author Simon Pollard for Deckchair UK Ltd
 * @version 1.0
 * @date August 2010
 */
jQuery.easing.def = "easeInOutCubic";
$(function() {

    $("#sections_holder").css("background","url(images/links_holder_bg.gif) repeat-x 0px 0px");
    $("#sections_holder").css("overflow","hidden");
    $("#sections_holder div").css("width","50px");
    $("#sections_holder div.first").css("width","550px");


    selected = $(".first");
    maxWidth = 550;
    minWidth = 50;

    $("div#sections_holder div a").click(
      function(){
        $(selected).animate({width: minWidth+"px"}, {queue:false, duration:400});
        $(selected).removeClass('selected');
        $(selected).removeClass('first');
        $h2 = $(this).parent();
        $($($h2).parent()).animate({width: maxWidth+"px"}, {queue:false, duration:400});
	$($($h2).parent()).addClass('selected');
	selected = $($h2).parent();
      }
    );
});
