var netfuel = {
    genTooltip: function(element, tiptxt) {
        $(element).wTooltip({
            content: tiptxt,
            fadeIn: 300,
            fadeOut: 30,
            className: "tooltip",
            style: false,
            offsetY: 22, //offsetY and offsetX properties designate position from the cursor 
            offsetX: 8,
            delay: 200,
            timeout: 0
        });
    },
    displayCobiFlash: function() {
        var flashvars = {
            configLocation: "swf/configuration.xml"
        }
        var params = {
            menu: "false",
            allowscriptaccess: "always",
            allowfullscreen: "true",
            allownetworking: "all",
            bgcolor: "#ffffff",
            wmode: "transparent"
        }
        var attributes = {
            id: "player1",
            name: "player1",
            style: "margin:0 auto;border: 1px dotted #8ABEC5"         
        }
        swfobject.embedSWF("swf/TreeMap.swf", "FlashDemo", "350", "200", "9.0.0", "expressInstall.swf", flashvars, params, attributes);    				
    }
};

$(document).ready(function() {
    $('.hidden').hide();

	// generate content slider display
	if ($.find('#slider')){
		$("#slider").easySlider({
			auto: true,
			pause: 11000,
			continuous: true,
			numeric: true,
			speed: 800
		});
	}
	
    // display footer ad panel if present
    if ($.find('#meerkat')) {
        meerkat({
            close: '.close',
            dontShow: '.dont-show',
            animation: 'slide',
            animationSpeed: 500,
            dontShowExpire: 0,
            meerkatPosition: 'bottom',
            background: '#2e2a22 url(images/bg-meerkat.jpg) repeat-x 0 0',
            height: '150px'
        });
    }

    var tipTwitter = netfuel.genTooltip("#footer a.twitter", "Twitter");
    var tipFacebook = netfuel.genTooltip("#footer a.facebook", "Facebook");
});

