﻿$(document).ready(function() {

   //var flash = flashAudio.getFlash();
   //alert(flash);
   
    
});

var flashAudio = {

    CQTVOn: function() {
        //alert("CQTVOn");
        var id = $("#mainHeroContainer").children().attr("id");
        //alert(id);
        //alert(this.getFlash(id));
        flashAudio.getFlash().soundOn();
    },
    CQTVOff: function() {
        //alert("CQTVOff");
        var id = $("#mainHeroContainer").children().attr("id");
        //alert(id);
        //alert(this.getFlash(id));
        flashAudio.getFlash().soundOff();
    },



    //returns a flash object so we can call it's internal actionscript methods
    getFlash: function() {
        //our swf object control appends a _swf to the id
        var movieName = $("#flashId").attr("value") + "_swf";

        var isIE6 = navigator.appName.indexOf("Microsoft") != -1 && (navigator.appVersion.indexOf("MSIE 6") != -1 || navigator.appVersion.indexOf("MSIE 5") != -1);
        return (isIE6) ? window[movieName] : document[movieName];
    }

}