﻿

var prefix = 'infoclass'; //prefix
var bl = 'bl'; //postfix
var ttl = 'ttl'; //postfix

var noClass = 'nablock';

var objects = new Array();


objects.push('biography');
objects.push('business');
objects.push('careers');
objects.push('quote');
objects.push('messages');

var linepostfix = 'line';
var blprefix = 'about';

function hideAboutClases()
{
    for(i = 0; i < objects.length ; ++i)
        $('.' + prefix + objects[i]).hide();
}

function clearLastLine()
{
    var className = 'line1';
    var count = $('.' + className);
    if(count.length > 1)
    {
        $("." + className + ":visible:last").hide();
    }
}

function aboutParser()
{

    var html = new String();
    for(i= 0 ; i < objects.length ; ++i)
    {
        html = $('.'+ prefix + objects[i]).html();
        
       
        if(html)
        {
            $('#'+ blprefix + objects[i] + bl).html(html);   
        }
        else
        {
            $('#' +blprefix + objects[i] + ttl).hide();
            $('#' +blprefix + objects[i] + bl).hide();
            $('#' + objects[i] + linepostfix).hide();
        }
        
    }    

}

hideAboutClases();
aboutParser();
clearLastLine();

///////////////////////////////////