function initCycleHeader() {
        $('#homeGallery').cycle( {
                fx: 'fade'
        });
}


$(document).ready(function() {
        var totalImageGallery = $('#homeGallery img').size();
        var totalImageCached = 0;
        $('#homeGallery img').cacheImage({
                complete: function(e) {
                        totalImageCached++;
                        if( totalImageCached == totalImageGallery )
                        {
                                initCycleHeader();
                        }
                }
        });

/*
	var nh  = $("#news").height();
                var noh = $("#news").outerHeight(true);
                var ch  = $("#content").height();
                var nmt = $("#news").css("margin-top");

                if( ch < noh ) {
                        $("#contentCenter").height(noh-$("#contentTop").height()-$("#contentBottom").height());
                } else if( noh < ch ) {
                        $("#newsCenter").height( ch-$("#newsTop").height()-$("#newsBottom").height() - $("#news").css("margin-top").replace("px","") );
                }
*/
});


