// JavaScript Document

$(function() {
	$('ul.nav a').bind('click',function(event){
       var $anchor = $(this);

        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 2000,'easeInOutSine');
        /*
        if you don't want to use the easing effects:
        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 1000);
        */
        event.preventDefault();
    });

	$('ul.sticker a').bind('click',function(event){
       var $anchor = $(this);

        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 2000,'easeOutSine');
        /*
        if you don't want to use the easing effects:
        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 1000);
        */
        event.preventDefault();
    });

$('#logo a').bind('click',function(event){
       var $anchor = $(this);

        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 2000,'easeOutSine');
        /*
        if you don't want to use the easing effects:
        $('html, body').stop().animate({
            scrollTop: $($anchor.attr('href')).offset().top
        }, 1000);
        */
        event.preventDefault();
    });

$('#logo a, #top-sticker a').click(function() {
    $('#navigation li').removeClass(selectedClass);
    $('#navigation li:first').addClass(selectedClass);
});

$("#twitter").getTwitter({
		userName: "guyanthonytwit",
		numTweets: 5,
		loaderText: "Hold on a second...",
		slideIn: true,
		showHeading: false,
		headingText: "Latest Tweets",
		showProfileLink: false
	});

});

//Cycle Slideshow

$('#web-slides').cycle({ 
    speed:       200, 
    timeout:     4000, 
    pager:      '.web-pager', 
    pauseOnPagerHover: true 
});


