Shadowbox.init({
    overlayOpacity: "0.8"
});

$(document).ready(function(){
    
    //dropdown
    $('#nav li').hover(  
        function () {  
            $('ul', this).slideDown(100);  
        },   
        function () {  
            $('ul', this).slideUp(100);           
        }  
    );
    
    $('#slideshow').cycle({ 
        fx: 'fade',
        speed: 1000,
   	    timeout: 4000
    });
    
    $('#bottom_bar').cycle({
        fx: 'fade',
        timeout: 6000,
        speed: 1000,
        cleartypeNoBg: 1,
        cleartype: 1
    });
    
    //price tabs
    $('#price_list').children().hide().css('position', 'absolute').css('top', '0').css('left', '0');
    
    $('#ladies').fadeIn('normal');
    
    $('#tabs li a').click(function() {
        
        $('#tabs li a').removeClass('selected');
        
        $(this).addClass('selected');
        
        var tabId = $(this).attr('href');
        
        $(tabId).siblings().fadeOut('fast');
        $(tabId).fadeIn('slow')
        
        return false;
        
    });
    
    var ladiesH = $('#ladies').outerHeight();
    var otherH = $('#other').outerHeight();
    var menH = $('#men').outerHeight();
    var coloursH = $('#colours').outerHeight();
    var foilsH = $('#foils').outerHeight();
    var technicalH = $('#technical').outerHeight();
    var childrenH = $('#children').outerHeight();
    
    var newHeight = Math.max(ladiesH, otherH, menH, coloursH, foilsH, technicalH, childrenH);
    
    $('#price_list').css('height', newHeight).css('min-height', newHeight);


    //delete button confirm
    $('a.delete_link').click(function() {

        if (!confirm('Are you sure you want to delete this item?')) {
            return false;
        }

    });
    
    
    
    
});
