$(document).ready(function() {
    //Sets thumbnails functionalities (load larger images)
    $("ul.thumbs-list li a").click(function(){
        if(typeof currentThumb != 'undefined') currentThumb.removeClass('current');

        $("img.midSizeImg").hide().attr({
            "src": $(this).attr("href"),
            "title": $("> img", this).attr("title")
        });
        currentThumb = $(this).parent().addClass('current');
        //$("#large h2").html($("> img", this).attr("title"));
        $("#main-Content").addClass('loading');
        return false;
    });
    $("img.midSizeImg").load(function(){
        $("img.midSizeImg:hidden").fadeIn("slow")
        });
    var currentThumb = $("ul.thumbs-list li.current");

    //overlay
    $("a[rel]").overlay({
        top:'center',
        left:'center',
        expose: {
            color: '#000',
            loadSpeed: 200,
            opacity: 0.7
        }
    });
    $("div.colors-list").appendTo("body");
});
