/**
 * @author ckew
 */
tabs = {
    initTabs: function () {
        // Check to see if ul element exists
        if (!$("ul.tabs").length) {
            return;
        }

        var loggedinState = ($("input[name$=plc$lt$zonePlaceHolder$pageplaceholder$pageplaceholder$lt$zoneSectionTabs$LoggedInControl$hdnloggedIN]").val());

        if (loggedinState == "true") {
            $("#tabRSS").show();
            $("#news").find("a").removeClass("current")
            $("#myRSS").find("a").addClass("current");
        }
        else {
            $("#tabNews").show();

        }
        //	// Show first tab			
        //	$("div#tabsHolder").each(function() {
        //		$(this).find("div.tabContent:first").show();
        //	});

        // Show correct tab when tab is clicked and hide previous shown tab
        $("ul.tabs a").click(function () {
            if (!$(this).hasClass("current")) {
                $("ul.tabs li.sel").removeClass("sel");
                $(this).parent("li").addClass("sel");
                $(this).addClass("current").parent("li").siblings("li").find("a.current").removeClass("current");
                $($(this).attr("href")).show().siblings("div.tabContent").hide();
            }
            this.blur();
            return false;
        });
    }
}

$(document).ready(function() {
	tabs.initTabs();
});
