﻿$(function(){

    if(editMode == true)
        return;
        
    $("div.feature").hover(function(){
        $(this).find(".colored").fadeIn("slow");
        $(this).find("a").addClass("hover");
    },function(){
        if($(this).hasClass("active") == false)
        {
            $(this).find(".colored").fadeOut("normal");
            $(this).find("a").removeClass("hover");
        }
    });
    $("div.feature img.colored").click(function(){
        var loc = $(this).parent().find("a").attr("href");
        if(loc != undefined && loc.length > 0)
            window.location = loc;
    });
    
    $("#features .feature:first").toggle(function(){
        $(this).addClass("active");
        var rangeBanner = $("#main .divRange #divRangeText");
        rangeBanner.css("right","-135px").fadeTo(1,0.95).animate({right: "0px"},500);
        $("#main #banner").hide();
        $("#main #divRange").show();
        $("#sidebar .divSidebarContent").fadeOut("normal");
        $("#sidebar .divRangeContent").fadeIn("slow");
    },function(){
        $(this).removeClass("active");
        $("#main #divRange").hide();
        $("#main #banner").show();        
        $("#sidebar .divRangeContent").fadeOut("normal");
        $("#sidebar .divSidebarContent").fadeIn("slow");
    });
});