$(document).ready(function () {
    $(".facebook").hover(function () {
        $("#callOutTopCtl").removeClass('callOutTop2 callOutTop3 callOutTop4').addClass('callOutTop1');
        $(".facebookContent").slideDown('slow');
        $(".vimeoContent").slideUp('slow');
        $(".linkedinContent").slideUp('slow');
        $(".twitterContent").slideUp('slow');
    });
    $(".vimeo").hover(function () {
        $("#callOutTopCtl").removeClass('callOutTop1 callOutTop3 callOutTop4').addClass('callOutTop2');
        $(".vimeoContent").slideDown('slow');
        $(".facebookContent").slideUp('slow');
        $(".linkedinContent").slideUp('slow');
        $(".twitterContent").slideUp('slow');
    });
    $(".linkedin").hover(function () {
        $("#callOutTopCtl").removeClass('callOutTop1 callOutTop2 callOutTop4').addClass('callOutTop3');
        $(".linkedinContent").slideDown('slow');
        $(".facebookContent").slideUp('slow');
        $(".vimeoContent").slideUp('slow');
        $(".twitterContent").slideUp('slow');
    });
    $(".twitter").hover(function () {
        $("#callOutTopCtl").removeClass('callOutTop1 callOutTop2 callOutTop3').addClass('callOutTop4');
        $(".twitterContent").slideDown('slow');
        $(".facebookContent").slideUp('slow');
        $(".vimeoContent").slideUp('slow');
        $(".linkedinContent").slideUp('slow');
    });

    if ($('.slideshow').length) {
    $('.slideshow').cycle({
        fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...                                                                                                                             
    });
    }


    if ($('.squares *').length) {
    $('.squares *').tooltip({
        showURL: false
    });
    }

jQuery('.gfield_description').each(function (i, e) {
    fielddesc = jQuery('<div>').append(jQuery(e).clone()).remove().html();
    jQuery(e).siblings('label.gfield_label').after(fielddesc);
    jQuery(e).remove();
});

    $("div.checkboxes label").click(function () {
        if ($(this).hasClass("active")) {
            $(this).removeClass("active");
        } else {
            $(this).addClass("active");
        }
    });


 /* articles & news hover img fix */
    var img_width = $('.main-article-hover img').width();
    var img_height = $('.main-article-hover img').height();
    $('.main-article-hover span').css('width', img_width);
    $('.main-article-hover span').css('height', img_height);
});


//CONTACT US PAGE
//When a user selects the checkbox "I need a site!", this script gives the user
//more options to choose from. It asks the user when they want to start on the site,
//and how much they intend to spend on the site.
function show_more_options() //This function is called by a single click on the "buildsite_c" checkbox
{
    if (document.getElementById("buildsite_c").checked == true)//Asks the checkbox whether it is selected or deselected. A selected checkbox will return "true" to the ".checked" method.
        {$("#more_options_field").show("fast");}//If the checkbox is selected, then show hidden dropboxes
            //document.getElementById("more_options_field").style.display="block";} //THIS IS WITHOUT JQUERY, FOR MY OWN REFERENCE
    else {//$("#more_options_field").hide("fast");} //If the checkbox is deselected, then hide the dropboxes. //FOR SOME REASON, THIS JQUERY COMMAND DOES NOT WORK ON WEBKIT BROWSERS
        document.getElementById("more_options_field").style.display="none";} //THIS IS NORMAL JS, BECAUSE JQUERY WAS MESSING UP WEBKIT BROWSERS.
}
//END (CONTACT US PAGE)
