/***************************************************************************
 * @Copyright: CSSJockey - Unique & Practical Web Presence
 * @Website: http://www.cssjockey.com/
 * @Portfolio: http://www.cssjockey.com/portfolio
 * @Contact: http://www.cssjockey.com/get-in-touch
 * @Privacy Policy & Terms of Use: http://www.cssjockey.com/terms-of-use
 ***************************************************************************/
$(document).ready(function(){

    // Document Scroll
    $(".scroll").click(function(event){
        event.preventDefault();
        var full_url = this.href;
        var parts = full_url.split("#");
        var trgt = parts[1];
        var target_offset = $("#"+trgt).offset();
        var target_top = target_offset.top;
        $('html, body').animate({
            scrollTop:target_top
        }, 3000);
    });

    //$("#top-nav li:last").addClass('current');

    $("#top-nav a.scroll").click(function(){
        $("#top-nav li").removeClass('current');
        $(this).parent().addClass('current');
    })

    // Welcome
    $('#slideshowHolder').jqFancyTransitions({
        effect: 'fountain',
        width: 350,
        height: 165,
        position: 'bottom', // top, bottom, alternate, curtain
        direction: 'fountain', // left, right, alternate, random, fountain,
        links: true
    });

    //Network
    $('#network-slide-show')
    .before('<div id="network-slide-nav">')
    .cycle({
        fx:     'scrollHorz',
        speed:  1000,
        timeout: 7000,
        pager:  '#network-slide-nav'
    });

    $(".slide").hover(function(){
        $('#network-slide-show').cycle('pause');
    },function(){
        $('#network-slide-show').cycle('resume');
    })

    $('#network-slide-nav a').html('&nbsp;');

})
