$(document).ready( function() {
	$( 'img[@src$=.png]' ).ifixpng();
	$( '.lightbox' ).lightbox();

	if ( $.browser.msie ) {
		$( 'a > img.gallery' ).hover( function() {
			$(this).addClass( 'ghover' );
		}, function() {
			$(this).removeClass( 'ghover' );
		});
	}

	$( 'table.list > tbody > tr:odd' ).each( function() {
		$(this).children().addClass( 'odd' );
	});

	// fix dropdown menu in IE
	if ( $.browser.msie ) {
		$( '#nav' ).children().each( function() {
			$(this).hover( function() {
				$(this).addClass( 'jshover' );
			}, function() {
				$(this).removeClass( 'jshover' );
			});
		});

		$( '#nav > li > ul > li' ).hover( function() {
			$(this).css( 'backgroundColor', '#fb95ba' );
		}, function() {
			$(this).css( 'backgroundColor', '#fdcadd' );
		});
	}

	// fix menu
	var width = 0;
	$( '#nav > li' ).each( function() {
		width += $(this).children( 'a' ).width();
	});

	width += ( $( '#nav > li' ).length * 32 );
	sdv = Math.round( ( 898 - width ) / 2 );
	$( '#nav' ).css( 'marginLeft', sdv );
});
