$(function(){
	$('.roll-over').each(function(){
		$(this)
		.hover(
			function(){
				$(this).addClass('hover');
			},
			function(){
				$(this).removeClass('hover');
			}
		);
		$(this).addClass('hover');
		if ($(this).css('background-image').match(/url\(["']*([^"']+)["']*\)/)) {
			this.hoverImage = new Image;
			this.hoverImage.src = RegExp.$1;
		}
		$(this).removeClass('hover');
	});

	if ($.fn.lightBox) {
		$('a.lightbox').lightBox({
			overlayBgColor: '#FFF',
			overlayOpacity: 0.7,
			imageLoading: '/common/img/lightbox-ico-loading.gif',
			imageBtnClose: '/common/img/lightbox-btn-close.gif',
			imageBtnPrev: '/common/img/lightbox-btn-prev.gif',
			imageBtnNext: '/common/img/lightbox-btn-next.gif',
			containerResizeSpeed: 200,
			txtImage: 'Image',
			txtOf: 'of'
		});
	}

	// FireFox のテーブル罫線消滅バグ対応
	if ($.browser.mozilla) {
		$('table').each(function(){
			setTimeout(function(table){
				$(table).addClass('separate');
				setTimeout(function(table){
					$(table).removeClass('separate');
				}, 0, table);
			}, 0, this);
		});
	}
});

