
jQuery(document).ready(function() {
    jQuery('.postTabs3_divs').hide();
    jQuery('.postTabs3_curr_div').show();
    jQuery('.postTabs3Links').each(function() {
        jQuery(this).click(function() {
            //alert(jQuery(this).attr('id'));
            var info = jQuery(this).attr('id').split('_');
            postTabs3_show(info[1], info[0]);
        });
    });
});

function postTabs3_show(bat,post){
		
		jQuery('.postTabs3_divs').each(function() {
            jQuery(this).hide();
        });
        jQuery('#postTabs3_ul_'+post + ' li').each(function() {
            jQuery(this).removeClass('postTabs3_curr');
        });
        jQuery('#postTabs3_li_'+bat+'_'+post).addClass('postTabs3_curr');
		jQuery("#postTabs3_"+bat+"_"+post).show();
		self.focus();

		//Cookies
		var expire = new Date();
		var today = new Date();
		expire.setTime(today.getTime() + 3600000*24);
		document.cookie = "postTabs3_"+post+"="+bat+";expires="+expire.toGMTString();

}

function posTabsShowLinks2(bat){
	if (bat) window.status=bat;
	else window.status="";
}

function postTabs3_getCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca[i];
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
