/*
*   A minimized version of this file exists using the file name of inserting .min before .js
*   To minimize, use http://refresh-sf.com/yui/ and save output to the .min equivalent of this file.
*/
$(document).ready(function()
{
    
if(1){

	// news slider - jQuery Cycle
	$("#b-footer #latest-buzz ul").cycle({ 
		fx: "scrollLeft",
		speedOut: -1000,
		speedIn: 500,
		next:   '#b-footer #latest-prev',
		prev: '#b-footer #latest-next' ,
    		auto: 0
	});
	
}    
    
    //$("#b-footer #latest-buzz ul").cycle({fx:"scrollLeft",speedOut:-1000,speedIn:500,next:"#b-footer #latest-prev",prev:"#b-footer #latest-next"});
    $("#b-footer .carousel").jCarouselLite({btnPrev:"#b-footer #step-left-control",btnNext:"#b-footer #step-right-control",visible:4,speed:500});
    $("#b-footer div.tab-content:gt(0)").hide();
    $("#b-footer .tab-links a").click(function()
    {
        var id = $(this).attr("href").split("-")[1];
        var div = $("div[id^='tab-" + id + "']");
        $("#b-footer .tab-links a").not(this).parent().removeClass("active");
        $(this).parent().addClass("active");
        $("#b-footer .tab-content").hide().removeClass("active");
        div.show().addClass("active");
        $(this).blur();
        return false
    });
    $(window).bind("load resize", function()
    {
        AdjustBackgroundOfFooter();
    })
});

function AdjustBackgroundOfFooter ()
{
    try
    {
        var bg = $("#b-footer .bg");
        var winWidth = $(this).width() + "px";
        var offsetL = ($("#b-footer").offset().left) * (-1) + "px";
        bg.css("width", winWidth).css("left", offsetL);
    }
    catch (aoXcp)
    {
        setTimeout(AdjustBackgroundOfFooter, 500);
    }
}


function CheckLength300Chars(aoSource, asArguments)
{
    var TextMessage;
    TextMessage = asArguments.Value;
    asArguments.IsValid = (TextMessage.length < 300)
}


