$(document).ready(function(){
    
    switch (FOA.currentPage) {
        case 'page_photobook_prices_pocket':
        case 'page_photobook_prices_panorama':
        case 'page_photobook_prices_original':
        case 'page_photobook_prices_premium':
        case 'page_photobook_prices_compact':
        case 'page_photobook_prices_classic':
        case 'page_photobook_prices_maxi':
        case 'page_canvas_prices':
            //for the table type1 in the prices pages
            $('tbody td').each(function(index,tdElement){
                var _col ="";
                $(tdElement).bind('mouseover', function(){
                    $(tdElement).parent().find('th').addClass('thbg1');
                    col =  $(tdElement).attr('class');
                    $('#'+col).addClass('thbg1');
                });
    
                 $(tdElement).bind('mouseout', function(){
                    $(tdElement).parent().find('th').removeClass('thbg1');
                    col =  $(tdElement).attr('class');
                    $('#'+col).removeClass('thbg1');
                });
            });
            break;
    
        case 'page_print_prices':
            $(".silk, .matt").each(function(index,tdElement){
                $(tdElement).bind('mouseover', function(){
                    $(tdElement).parent().find('.format').addClass('thbg1');
                });

                $(tdElement).bind('mouseout', function(){
                    $(tdElement).parent().find('.format').removeClass('thbg1');
                });
            });
            break;
        case 'page_poster_prices':
            // for the drop menu in the poster/prices page              
            $('#poster_type a').bind('click',function(element){
                var _trClassName;
                _trClassName = this.className;

                if (_trClassName != 'all') {
                    $("tbody tr").hide();
                    $('tr.'+ _trClassName ).show();
                } else {
                    $("tbody tr").show();
                }
              }
            );
            
            break;
    }   
});
  
  
  
