﻿$(document).ready(function() {

    $("#myControllerSmall").jFlow({
        slides: "#mySlidesSmall",
        width: "495px",
        height: "255px",
        duration: 1000
    });

//    $("#myControllerLarge").jFlow({
//        slides: "#mySlidesLarge",
//        width: "892px",
//        height: "261px",
//        duration: 1000
//    });

    $(".lightbox").lightbox();

    $(".servicelink").click(function() {
        var divname = this.rel;
        var aname = "li" + this.id;
        $("#liapphost").removeClass("active");
        $("#liappdev").removeClass("active");
        $("#liav").removeClass("active");
        $("#" + aname).toggleClass("active");
        $("#divappdev").hide("fast");
        $("#divapphost").hide("fast");
        $("#divav").hide("fast");
        $("#" + divname).animate({ opacity: 'toggle', height: 'toggle' }, 'slow');

    });

    $('#tabs div').hide(); // Hide all divs
    $('#tabs div:first').show(); // Show the first div
    $('#tabs ul li:first').addClass('active'); // Set the class for active state
    $('#tabs ul li a').click(function() { // When link is clicked
        $('#tabs ul li').removeClass('active'); // Remove active class from links
        $(this).parent().addClass('active'); //Set parent of clicked link class to active
        var currentTab = $(this).attr('href'); // Set currentTab to value of href attribute
        $('#tabs div').hide(); // Hide all divs
        $(currentTab).show(); // Show div with id equal to variable currentTab
        return false;
    });
});