﻿$(document).ready(function() {

    //hide the unselected service text boxes
    $('.service-text').hide('fast');
    $('.selected').show('fast');

    //mouse over effects
    $('.icon').hover(function() {
        $(this).css('opacity', 0.50);
    }, function() {
        $(this).css('opacity', 1.00);
    });

    //click action, gets the corrisponding information, fades the current one out, fades new one in
    $('.icon').click(function() {
        var step = $(this).attr('alt')
        if (navigator.appName == "Microsoft Internet Explorer") {
            $('.selected').css('display', 'none');
        } else {
            $('.selected').fadeOut('fast');
        }
        $('.selected').removeClass('selected');
        if (navigator.appName == "Microsoft Internet Explorer") {
            setTimeout("$('div." + step + "').css('display', 'block').addClass('selected');", 200);
        } else {
            setTimeout("$('div." + step + "').fadeIn('fast').addClass('selected');", 200);
        }
    });
});