/********************************************************************
    File:   
        services.js
    Brief:  
        Implementation of JavaScript functionality for 
        the services.html page
    Dependencies:
        jquery-1.3.2.min.js             (jQuery library)
        jquery.easing.1.2.js            (jQuery library plugin)
        cufon-yui.js                    (font replacement tool)
    Author:
        DigitalCavalry
    Author URI:
        http://graphicriver.net/user/DigitalCavalry
*********************************************************************/ 

// alias to jQuery library, function noConflict release control of the $ variable 
// to whichever library first implemented it
var $j = jQuery.noConflict();

/***************************************
    ADD CUFON FONT REPLACEMENT
****************************************/

function setupAdditionalCufonFontReplacement()
{
    if(g_useCufon == false)
    {
        return;
    }

    Cufon.replace("#featuresContainer .title", {fontWeight: 400});
    Cufon.replace("#servicesBigInfo .title", {fontWeight: 300});
    Cufon.replace("#servicesSmallInfo .title", {fontWeight: 300});
} // end of function setupAddCufonFontReplacement

/***************************************
    SETUP SERVICES
****************************************/

function setupServices()
{
    // remove top border form first full width service   
    $j('#servicesBigInfo .item:first').css('border-top', '1px solid #FFF');
    
    // get number of all wrappers
    var count = $j('#featuresContainer .wrapper').length;
    for(var i = 0; i < count; i++)
    {
       if((i+1)%3 == 0)
       {
            $j('#featuresContainer .wrapper:eq('+i+')').css('border-right', '1px solid #FFF');
       }
        
    } // for
    
    // remove right border form last boxes service       
    $j('#featuresContainer .wrapper:last').css('border-right', '1px solid #FFF');    
} // end of function setupServices
    
/***************************************
    MAIN CODE - CALL THEN PAGE LOADED
****************************************/
       
// binding action to event onload page
$j(document).ready(
    function()
    {
        // common.js
        setupGlobal();          
        setupToolTipText();
        setupSearchBox();
        setupCufonFontReplacement();
        setupSideBarMiniSlider();
        setupMultiImageLightBox();
        setupSidebarTabsPanel();
        setupLoadingAsynchronousImages();
        setupToolTipImagePreview();
        setupTextLabelImagePreview();
        // this file
        setupServices();  
        setupAdditionalCufonFontReplacement();
    }
);




    
