﻿/*.........................................

	Title:		Website Interface
	Author:		imran@xsstudios.com
	Created:	July 7, 2010
	Version:	1.0
    Website:	http://www.xsstudios.com
	
..........................................*/

$(document).ready(function(){
    $('.form-container').attr({'style':'position:absolute; width:725px; display:none;'});
    $('#formBusinessEnquiry').show();
    $('#vwWhatIsIt').show();
        
});

function viewBusinessInquiryForm(){
    $('.error-box').attr('style','display:none;');
    
    if(!$('#formRola').is(':hidden'))
        $('#formRola').hide("slide", { direction: "right" }, 1000);
    else if(!$('#formQuestions').is(':hidden'))
        $('#formQuestions').hide("slide", { direction: "right" }, 1000);
    
    $('#imgHeading').attr({'src':'images/subpages/headings/business_inquiry.jpg'});
    $('#formBusinessEnquiry').show("slide", { direction: "left" }, 1000);
    Invalidate();
    
    tabsHighlight('#tab1');    
    
}
function viewJustWannaHollaForm(){
    $('.error-box').attr('style','display:none;');
    
    
    if(!$('#formBusinessEnquiry').is(':hidden'))
        $('#formBusinessEnquiry').hide("slide", { direction: "right" }, 1000);
    else if(!$('#formQuestions').is(':hidden'))
        $('#formQuestions').hide("slide", { direction: "right" }, 1000);
    
    
    $('#imgHeading').attr({'src':'images/subpages/headings/just_wanna_holla.jpg'});
    $('#formRola').show("slide", { direction: "left" }, 1000);
    Invalidate();
    
    tabsHighlight('#tab2');
}

function viewQuestionForm(){    
    $('.error-box').attr('style','display:none;');
    
    
    if(!$('#formBusinessEnquiry').is(':hidden'))
        $('#formBusinessEnquiry').hide("slide", { direction: "right" }, 1000);
    else if(!$('#formRola').is(':hidden'))
        $('#formRola').hide("slide", { direction: "right" }, 1000);
    
    
    $('#imgHeading').attr({'src':'images/subpages/headings/question.jpg'});
    $('#formQuestions').show("slide", { direction: "left" }, 1000);
    Invalidate();
    
    tabsHighlight('#tab3');
}

function viewWhatIsItForm(){
    $('.error-box').attr('style','display:none;');
    
    
    if(!$('#vwWhyApply').is(':hidden'))
        $('#vwWhyApply').hide("slide", { direction: "right" }, 1000);
    else if(!$('#vwApplyForm').is(':hidden'))
        $('#vwApplyForm').hide("slide", { direction: "right" }, 1000);
    
    
    $('#vwWhatIsIt').show("slide", { direction: "left" }, 1000);
    //Invalidate();
    
    tabsHighlight('#tab1');
}

function viewWhyApplyForm(){
    $('.error-box').attr('style','display:none;');
    
    if(!$('#vwWhatIsIt').is(':hidden'))
        $('#vwWhatIsIt').hide("slide", { direction: "right" }, 1000);
    else if(!$('#vwApplyForm').is(':hidden'))
        $('#vwApplyForm').hide("slide", { direction: "right" }, 1000);
    
    
    $('#vwWhyApply').show("slide", { direction: "left" }, 1000);
    //Invalidate();
    
    tabsHighlight('#tab2');
}

function viewApplyHereForm(){    
    $('.error-box').attr('style','display:none;');
    
    if(!$('#vwWhatIsIt').is(':hidden'))
        $('#vwWhatIsIt').hide("slide", { direction: "right" }, 1000);
    else if(!$('#vwWhyApply').is(':hidden'))
        $('#vwWhyApply').hide("slide", { direction: "right" }, 1000);
    
    $('#vwApplyForm').show("slide", { direction: "left" }, 1000);
    //Invalidate();
    
    tabsHighlight('#tab3');
}

function tabsHighlight(activeTab){
    $('.tabs-container li').each(function(i){
        if($(this).hasClass('tab-on')){
            $(this).removeClass('tab-on').addClass('tab-off');
            $(this).find('a').attr('style','color:#fff;');
            }
    });
    
    $(activeTab).removeClass('tab-off').addClass('tab-on');    
    $(activeTab).find('a').attr('style','color:#646464;');
    
}
