$(document).ready(function(){ $('.actionimg img').hover(function(){ $('.actionimg img').css({'opacity':.2}); $(this).css({'opacity':1}); },function(){ $('.actionimg img').css({'opacity':1}); }); $('.switchnav table').hide(); $('.switchnav h2').append('click here to view'); $('.switchnav h2').click(function(){ if($(this).parent('div').find('table').is(":hidden")){ $(this).parent('div').find('table').slideDown(); $(this).children('span').fadeOut(); $('.switchnav table:visible').hide(); $('.switchnav span:not(:visible)').fadeIn(); } else { $(this).parent('div').find('table').slideUp(); $(this).children('span').fadeIn(); }; }); $('#gallery li').hover(function(){ $('#gallery li').stop().animate({'opacity' : .4}); $(this).stop().animate({'opacity' : 1}); },function(){ $('#gallery li').stop().animate({'opacity' : 1}); }); $("#gallery li a,.switchnav td a").prettyPhoto({ animationSpeed: 'normal', /* fast/slow/normal */ padding: 40, /* padding for each side of the picture */ opacity: 0.35, /* Value betwee 0 and 1 */ showTitle: true, /* true/false */ allowresize: true, /* true/false */ counter_separator_label: ' / ', /* The separator for the gallery counter 1 "of" 2 */ theme: 'dark_square' /* light_rounded / dark_rounded / light_square / dark_square */ }); });