/**
 * $Id: nads.js [yyyy-mm-dd] $
 *
 * @author [Developer Name]
 * @copyright Copyright (c) [yyyy], Trapeze, All rights reserved.
 *
 * Dependencies:
 *      jQuery 1.3.1        (http://www.jquery.com),
 */

trapeze = {
    init : function() {
        var page = $('body').attr('class');
        page = (page.indexOf(' ') > 0) ? page.slice(0,page.indexOf(' ')) : page;
        switch(page) {
            case 'home-page':
                //Code to be executed on the home page
                break;
            case 'about-page':
                //Code to be executed on the about page
                break;
            default:
                //Code to be executed on any page, but the pages listed above.
        }

        // Code to be executed on every page
    },
    
    noFlash: function() {
        var qs = window.location.search;
        var noflash = false;
        
        if (qs != '') {
            qs = qs.substring(1, qs.length);
            pieces = qs.split('&');

            for (var i = 0; i < pieces.length; i++) {
                piece = pieces[i];
                keyval = piece.split('=');
                key = keyval[0];
                val = keyval[1];

                if (key == "noflash" && val == "true") {
                    noflash = true;
                }
            }
        }
        
        return noflash;
    }
}

$(function() {
	
	$("#FlashToggle .active").removeClass("active");
	
	if (NO_FLASH) {
		$("#TurnFlashOn").addClass("active");
		$(".TurnFlashOn").addClass("active");
	}
	else {
		$("#TurnFlashOff").addClass("active");
		$(".TurnFlashOff").addClass("active");
	}
});

