// ====================
// = dropdown menu js =
// ====================
$(document).ready(function() {
    $('#nav li').hover(
    function() {
        //show its submenu
        $('ul', this).stop(true, true).slideDown(100);
    },
    function() {
        //hide its submenu
        $('ul', this).stop(false, true).slideUp(500);
    }
    );
});

// =====================
// = move nav on click =
// =====================
$(document).ready(function() {

    // Using multiple unit types within one animation.
    $(".move").click(function() {
        $("#nav").animate({
            marginTop: "-310px"
        },
        700);
    });
});


//=========
//= print =
//=========
$(document).ready(function() {
    $(".disappear_print").click(function() {
        $("#print").fadeOut("slow");
    });
});
$(document).ready(function() {
    $(".appear_print").click(function() {
        $("#print").fadeIn("slow");
    });
});
// ======
// = tv =
// ======
$(document).ready(function() {
    $(".appear_tv").click(function() {
        $("#tv").fadeIn("slow");
    });
});
$(document).ready(function() {
    $(".disappear_tv").click(function() {
        $("#tv").fadeOut("slow");
    });
});
// =========
// = radio =
// =========
$(document).ready(function() {
    $(".appear_radio").click(function() {
        $("#radio").fadeIn("slow");
    });
});
$(document).ready(function() {
    $(".disappear_radio").click(function() {
        $("#radio").fadeOut("slow");
    });
});
// ===============
// = interactive =
// ===============
$(document).ready(function() {
    $(".appear_interactive").click(function() {
        $("#interactive").fadeIn("slow");
    });
});
$(document).ready(function() {
    $(".disappear_interactive").click(function() {
        $("#interactive").fadeOut("slow");
    });
});
// =========
// = logo =
// =========
$(document).ready(function() {
    $(".appear_logo").click(function() {
        $("#logo").fadeIn("slow");
    });
});
$(document).ready(function() {
    $(".disappear_logo").click(function() {
        $("#logo").fadeOut("slow");
    });
});
// =========
// = social media =
// =========
$(document).ready(function() {
    $(".appear_social").click(function() {
        $("#social").fadeIn("slow");
    });
});
$(document).ready(function() {
    $(".disappear_social").click(function() {
        $("#social").fadeOut("slow");
    });
});

// ==============================
// = background image disappear =
// ==============================
$(document).ready(function() {
    $(".disappear").click(function() {
        $("#funnel-background").fadeOut("slow");
        $(ul, this).stop(false, true).slideDown(100);
        $(ul, this).stop(false, true).slideUp(100);
    });

});

$(document).ready(function() {

    $(".reappear").click(function() {
        $("#example1").fadeIn("slow");
    });

});
// ===================
// = TV Video Select =
// ===================
$(document).ready(function() {
    $(".appear-aow").click(function() {
        $("#tv-aow-1,#tv-aow-2").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-aow").click(function() {
        $("#tv-aow-1,#tv-aow-2").stop(false, true).fadeOut("normal");
    });
});



$(document).ready(function() {
    $(".appear-rps").click(function() {
        $("#tv-rps-1,#tv-rps-2,#tv-rps-3,#tv-rps-4").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-rps").click(function() {
        $("#tv-rps-1,#tv-rps-2,#tv-rps-3,#tv-rps-4").stop(false, true).fadeOut("normal");
    });
});

$(document).ready(function() {
    $(".appear-quest-casino").click(function() {
        $("#tv-quest-1").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-quest-casino").click(function() {
        $("#tv-quest-1").stop(false, true).fadeOut("normal");
    });
});

$(document).ready(function() {
    $(".appear-whitworth").click(function() {
        $("#tv-whitworth-1, #tv-whitworth-2, #tv-whitworth-3, #tv-whitworth-4").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-whitworth").click(function() {
        $("#tv-whitworth-1, #tv-whitworth-2, #tv-whitworth-3, #tv-whitworth-4").stop(false, true).fadeOut("normal");
    });
});

$(document).ready(function() {
    $(".appear-george-gee").click(function() {
        $("#tv-george-gee-1").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-george-gee").click(function() {
        $("#tv-george-gee-1").stop(false, true).fadeOut("normal");
    });
});

$(document).ready(function() {
    $(".appear-wtb").click(function() {
        $("#tv-wtb-1").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-wtb").click(function() {
        $("#tv-wtb-1").stop(false, true).fadeOut("normal");
    });
});

$(document).ready(function() {
    $(".appear-cvc").click(function() {
        $("#tv-cvc-1").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-cvc").click(function() {
        $("#tv-cvc-1").stop(false, true).fadeOut("normal");
    });
});


$(document).ready(function() {
    $(".appear-dsp").click(function() {
        $("#tv-downtown-spokane-1, #tv-downtown-spokane-2, #tv-downtown-spokane-3").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-dsp").click(function() {
        $("#tv-downtown-spokane-1, #tv-downtown-spokane-2, #tv-downtown-spokane-3").stop(false, true).fadeOut("normal");
    });
});



$(document).ready(function() {
    $(".appear-symphony").click(function() {
        $("#tv-symphony-1").stop(false, true).fadeIn("normal");
    });
});
$(document).ready(function() {
    $(".disappear-symphony").click(function() {
        $("#tv-symphony-1").stop(false, true).fadeOut("normal");
    });
});





// ==========================================
// = open new window (like target="_blank") =
// ==========================================

function externalLinks() {  
 if (!document.getElementsByTagName) return;  
 var anchors = document.getElementsByTagName("a");  
 for (var i=0; i<anchors.length; i++) {  
   var anchor = anchors[i];  
   if (anchor.getAttribute("href") &&  
       anchor.getAttribute("rel") == "external")  
     anchor.target = "_blank";  
 }  
}  
window.onload = externalLinks;


// ==================
// = interactive tooltip =
// ==================

$(document).ready(function() {
    $(".client_logo_web1").mouseleave(function() {
        $(".web-link-1").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web1").mouseenter(function() {
        $(".web-link-1").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web2").mouseleave(function() {
        $(".web-link-2").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web2").mouseenter(function() {
        $(".web-link-2").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web3").mouseleave(function() {
        $(".web-link-3").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web3").mouseenter(function() {
        $(".web-link-3").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web4").mouseleave(function() {
        $(".web-link-4").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web4").mouseenter(function() {
        $(".web-link-4").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web5").mouseleave(function() {
        $(".web-link-5").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web5").mouseenter(function() {
        $(".web-link-5").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web6").mouseleave(function() {
        $(".web-link-6").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web6").mouseenter(function() {
        $(".web-link-6").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web7").mouseleave(function() {
        $(".web-link-7").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web7").mouseenter(function() {
        $(".web-link-7").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web8").mouseleave(function() {
        $(".web-link-8").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web8").mouseenter(function() {
        $(".web-link-8").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web9").mouseleave(function() {
        $(".web-link-9").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web9").mouseenter(function() {
        $(".web-link-9").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web10").mouseleave(function() {
        $(".web-link-10").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web10").mouseenter(function() {
        $(".web-link-10").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web11").mouseleave(function() {
        $(".web-link-11").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web11").mouseenter(function() {
        $(".web-link-11").fadeIn("fast");
    });
});

$(document).ready(function() {
    $(".client_logo_web12").mouseleave(function() {
        $(".web-link-12").fadeOut("fast");
    });
});
$(document).ready(function() {
    $(".client_logo_web12").mouseenter(function() {
        $(".web-link-12").fadeIn("fast");
    });
});

