﻿// Image hover fade
$(document).ready(function() {
    $(".fadeImage").fadeTo("slow", 1.0); // This sets the opacity of the thumbs to fade down to 30% when the page loads
    $(".fadeImage").hover(function() {
        $(this).fadeTo("slow", 0.7); // This should set the opacity to 100% on hover
    }, function() {
        $(this).fadeTo("slow", 1.0); // This should set the opacity back to 30% on mouseout
    });
});

// Show Hide Slide
$(document).ready(function() {
    $(".listTitle").click(function() {
        $(this).parent().children(".listSummary").slideToggle("normal");
        $(this).toggleClass("active");
        return false;
    });
});

// Show Hide Tabs
jQuery(document).ready(function() {
    $(".htabs").find("a").click(function() {
        $(".on").removeClass("on");
        Cufon.refresh();
        $(this).addClass("on");
    });
});

// Tab Switcher
jQuery(document).ready(function() {
    jQuery(".tab:first").show();
});

// Joint switcher
$(function() {
    $("#content-slider-inside li a").click(function() {
        var id = $(this).attr("href");
        $("#content-slider-inside li").hide();

        return false;
    });

    $("#navigation li a").click(function() {
        var id = $(this).attr("href");
        $("#content-slider-inside li.tab").hide();
        $(id).show();

        return false;
    });
});

// Pulsing
jQuery(document).ready(function() {
    $('.pulse').pulse({
        opacity: [0.5, 1]
    }, {
        times: 999999
    });
});

// Back to top slide
$(document).ready(function() {
    $("a.backToTop").click(function() {
        $('html, body').animate({ scrollTop: 0 }, 'slow');
        return false;
    });
});
