function formatText(index, panel) {
  return index + "";
}

$(function () {
	
	$("a#readnext").click(function(){
		$("span#readprev").fadeOut();
		$("span#readnext").fadeIn();
	});

	$("a#readprev").click(function(){
		$("span#readnext").fadeOut();
		$("span#readprev").fadeIn();
	});

    $('.slider').anythingSlider({
        easing: "easeInOutExpo",        // Anything other than "linear" or "swing" requires the easing plugin
        autoPlay: true,                 // This turns off the entire FUNCTIONALY, not just if it starts running or not.
        delay: 3000,                    // How long between slide transitions in AutoPlay mode
        startStopped: false,            // If autoPlay is on, this can force it to start stopped
        animationTime: 600,             // How long the slide transition takes
        hashTags: true,                 // Should links change the hashtag in the URL?
        buildNavigation: false,          // If true, builds and list of anchor links to link to each slide
		pauseOnHover: true,             // If true, and autoPlay is enabled, the show will pause on hover
		startText: "Go",             // Start text
        stopText: "Stop",               // Stop text
        navigationFormatter: formatText       // Details at the top of the file on this use (advanced use)
    });
    
    $(".right-arrow").click(function(){
        $('.slider').anythingSlider(6);
    });
    
});

$(document).ready(function() {

// tabs
$("div.tabs .tab-skills").css('display','block');

$("div.tabs a.skills").click(function(){
	$("div.tabs div.content").hide();
	$("div.tabs div.content.tab-skills").show();
	$("div.tabs a.nav").removeClass("active");
	$("div.tabs a.nav.skills").addClass("active");
});

$("div.tabs a.education").click(function(){
	$("div.tabs div.content").hide();
	$("div.tabs div.content.tab-education").show();
	$("div.tabs a.nav").removeClass("active");
	$("div.tabs a.nav.education").addClass("active");
});

$("div.tabs a.certificates").click(function(){
	$("div.tabs div.content").hide();
	$("div.tabs div.content.tab-certificates").show();
	$("div.tabs a.nav").removeClass("active");
	$("div.tabs a.nav.certificates").addClass("active");
});


// jumps
$(".mywork").click(function(){
        var destination = $("#mywork").offset().top;
	$("html,body").animate({ scrollTop: destination},"20000","easeInQuad");
});

$(".aboutme").click(function(){
        var destination = $("#aboutme").offset().top;
	$("html,body").animate({ scrollTop: destination},"20000","easeInQuad");
});

$(".gaq").click(function(){
        var destination = $("#gaq").offset().top;
	$("html,body").animate({ scrollTop: destination},"20000","easeInQuad");
});

$(".gm").click(function(){
        var destination = $("#gaq").offset().top;
	$("html,body").animate({ scrollTop: destination},"20000","easeInQuad");
});

$(".backtop").click(function(){
        var destination = $("html").offset().top;
	$("html,body").animate({ scrollTop: destination},"20000","easeInQuad");
});

});
