/********************************************************************
    File:   
        classicGallery.js
    Brief:  
        Implementation of JavaScript functionality for 
        the classicGallery[x].html view page
    Dependencies:
        jquery-1.3.2.min.js             (jQuery library)
        jquery.easing.1.2.js            (jQuery library plugin)
        jquery.prettyPhoto.js           (image gallery)
        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();



/***************************************
    CLASSIC GALLERY LIGHT BOX
****************************************/

// set prettyPhoto
function setupClassicGalleryLightBox()
{
    // we set pretty photo light box for every <a> element
    // which have attribute rel startet from string "prettyPhoto"
    // additionally:
    //      - we allow to resize image 
    //      - set the light box theme to light_rounded
    //      - set own separtor for page list
    //      - and allow to display title
    $j("a[rel^='prettyPhoto']").prettyPhoto({
        theme: 'light_rounded', 
        allowresize: true,
        counter_separator_label: '-',
        showTitle: true
    });
} // end of function setupClassicGalleryLightBox

/***************************************
    ADDITIONAL CUFON FONT REPLACEMENT
****************************************/

function setupAdditionalCufonFontReplacement()
{
    Cufon.replace(".galleryOtherHeader", {fontWeight: 300});
    Cufon.replace(".galleryListItemContainer h1", {fontWeight: 300});  
       
}  // end of function setupAdditionalCufonFontReplacement

/***************************************
    SET PAGE UP
****************************************/

function setupClassicImageGallery()
{
    setupClassicGalleryLightBox();
    setupAsynchronousThumbsLoading();
    setupSliderAndThumbs();
    setupAdditionalCufonFontReplacement();
} // end of function setupClassicImageGallery
    
/***************************************
    MAIN CODE - CALL THEN PAGE LOADED
****************************************/
       
// binding action to event onload page
$j(document).ready(
    function()
    {
        // common.js
        setupToolTipImagePreview();
        // this file                
        setupClassicImageGallery();   
    }
);




    