Shadowbox.loadSkin('classic', '/media/shadowbox-2.0/src/skin');
Shadowbox.loadLanguage('en', '/media/shadowbox-2.0/src/lang');
Shadowbox.loadPlayer(['img','swf','qt','flv','wmp','iframe','html'], '/media/shadowbox-2.0/src/player');
jQuery(document).ready(function() {
        Shadowbox.init();
        $('.fader').innerfade({speed: 1500 ,timeout: 4000, containerheight: '310px'});
        $('#headergallery').css('background-image','none');
        $('#mainnav > ul > li > ul').fadeOut('fast');
        $('#mainnav > ul > li.current > ul').css('left','0px').fadeIn('slow');
        $('#mainnav > ul > li > a').mouseenter(function(e) {
            $(this).parent().siblings('li').children('ul').css( 'left','-999em' ,'display','block');
            $(this).parent().children('ul').css('left','0px').fadeIn('fast');
            });
        /*
           $('#mainnav > ul > li > a').mouseleave(function(e) {
           $(this).parent().children("ul").animate({ marginLeft: 0 }, 2000).fadeOut("slow", function () {
           });

           });
         */

        if ($('#features .item').length) { // implies *not* zero
        $('#sections').mouseleave(function(e) {
            $(this).children('ul').children('li').children('div').children('a').children('img').stop().animate({
height: '190',
top: '0',
left: '0',
width: '220',
opacity: '1'},
450,
'easeOutQuart');
            });       


        $('#features li').mouseenter(function(e) {
                $(this).siblings().children('div').children('a').children('img').stop().animate({
height: '150',
top: '22',
left: '22',
width: '173',
opacity: '0.5'},
450,
'easeOutQuart');


                $(this).children('div').children('a').children('img').stop().animate({ 
height: '199',
top: '0',
left: '-5',
width: '230',
opacity: '1'},
450, 
'easeOutQuart');
                });       

        $('#features').serialScroll({target:'#sections',
                items:'li',
                prev:'a.next',
                next:'a.prev',
                //navigation:'#scroll-nav li',
                //   interval:10000,
                duration:2000,
                force:true,
                easing:'easeInOutQuart', //use this easing equation for a funny effect
                axis:'x',
                stop:true,
                lock:false,
                cycle:true, //don't pull back once you reach the end
                jump:false,
                step:2,
                exclude:3
                });
        } 

});
