$(document).ready(function(){
    
	$("#nav ul li a").hover(function(){
		$(this).find("span").addClass("hover");
	}, function(){
		$(this).find("span").removeClass("hover");
	});

    // Code for tabbed box
    $("#topRight #box").css({"overflow":"hidden"});
    $("#tabs li a").click(function(){
        $("#box li:not(.sub li)").each(function(i){
            $(this).hide();
            $("#tabs li").each(function(j){
                $(this).removeClass("current");
            });
        });
        $(this).parent("li").addClass("current");
        return false;
    });
    $("#tabs li a[href*=exp]").click(function(){
        $("#box li#experience").show();
    });
    $("#tabs li a[href*=edu]").click(function(){
        $("#box li#education").show();
    });
    $("#tabs li a[href*=ded]").click(function(){
        $("#box li#dedication").show();
    });
    $("#tabs li a[href*=test]").click(function(){
        $("#box li#testimonials").show();
    });
	// buyers page options
    $("#tabs li a[href*=search]").click(function(){
        $("#box li#homeSearch").show();
    });
	$("#tabs li a[href*=tip]").click(function(){
        $("#box li#buyingTip").show();
    });


    // Code for scrolling panel of listings
    $('#scrollWrapper').serialScroll({
		items:'li',
		prev:'#scrollPanel a#prev',
		next:'#scrollPanel a#next',
		duration:800,
		force:false,
		stop:true,
		lock:false,
		step:1,
		exclude:3,
		cycle:false
	});
	
	
});
