/********************************************************************
    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()
{
    Cufon.replace(".featureTitle", {fontWeight: 400});
    Cufon.replace("#servicesBigInfo .title", {fontWeight: 300});
	Cufon.replace("#servicesMenuBlocks .title", {fontWeight: 400});
    Cufon.replace("#servicesSmallInfo .title", {fontWeight: 300});
} // end of function setupAddCufonFontReplacement

function setupExpandDesc()
{
	$j('#servicesMenuBlocks').show();
	$j('.item').hide();
	$j('.toOpen').hide();
	
	$j(".block:odd").css({'background-color':'#1a1a1a'});
	$j(".block:even").css({'background-color':'#000000'});
	
	$j(".block").hover(
		function() {
		$j(this).stop().css({'background-color':'#333333'});
		}, function() {
		//$j(this).stop().css({'background-color':'#000000'});
		$j(".block:odd").css({'background-color':'#1a1a1a'});
		$j(".block:even").css({'background-color':'#000000'});
		}
	);
	
    // when click on box slide open desc
    $j(".block").click(
        function()
        {
			var openUp = $j(this).find('.toOpen').text();
            $j('#item-'+openUp).siblings(":visible").slideUp("slow");
			$j('#item-'+openUp).slideToggle("slow").animate({'height' : '500px'}, fast);
			return false;
        }
    );
} // end of function
    
/***************************************
    MAIN CODE - CALL THEN PAGE LOADED
****************************************/
       
// binding action to event onload page
$j(document).ready(
    function()
    {
        // common.js
        setupGlobal();
        setupCommunityButtons();            
        setupToolTipText();
        setupSearchBox();
        setupCufonFontReplacement();
        setupSideBarMiniSlider();
        setupMultiImageLightBox();
        setupSidebarTabsPanel();
        setupLoadingAsynchronousImages();
        setupToolTipImagePreview();
        setupTextLabelImagePreview();
        // this file
        setupAdditionalCufonFontReplacement();
		setupExpandDesc();
    }
);


    