/*
 * Nav.JS - AJD 20100408
 * Actually this is a bit more than just nav, it really should be renamed as common, but really I really
 * can't be arsed. It's late, I'm tired, client keeps changing her mind.
 */


var $j=jQuery.noConflict();
$j(document).ready(function() {

    // Navigation functions
    if ( $j('#product').length ) {
        $j('#menu li ul').css('background-color','#FFFFFF');
    }
    $j('.level1').hover(function() {
        console.debug('over');
        $j(this).find('ul').show();
    },function() {
        console.debug('out');
        $j(this).find('ul').hide();
    });
    // -- End Nav

    // Gallery functions
    $j('a[rel=gallery]').fancybox({
        'titlePosition' 	: 'inside'
    });
    if ( $j('a[rel=gallery]').length ) {
        /* qiuck cheat for adding a buy button to the gallery pages*/
        var link=$j('.thumb img').attr('alt');
        $j('<div id="advance"></div>')
        .html(link)
        .appendTo('#contents');
    }
    // -- End Gallery
});



