
/*----------------------------------------------

	Theme Name: design works onside inc.
	http://www.onside.com/
	Description: Gallery JavaScript　06-15-2010 (mm-dd-yyyy)
	Version: ver. 1.0

----------------------------------------------*/

$(document).ready(function() {

// 背景画像のスライド（jquery.BgImageTransition）
	var bgImages = [ 'contents_images_01.jpg', 'contents_images_03.jpg', 'contents_images_04.jpg', 'contents_images_05.jpg', 'contents_images_06.jpg', 'contents_images_07.jpg', 'contents_images_08.jpg' ];
	var currImage = 'contents_images_02.jpg';
	setInterval( function(){
		do{
			var randImage = bgImages[Math.ceil(Math.random()*(bgImages.length-1))];
		}while( randImage == currImage )
		currImage = randImage;
		$('#blaf').BgImageTransition( '/common/img/'+currImage );
	}, 5000)

	$('a.lightbox').lightBox();
	$('#thumbBlock li a').lightBox();

	$('.pkg h3').corner('10px top');

	$('.pkg').hover(
		function() {
			$(this).find('h3').addClass('hover');
			$(this).find('p').addClass('hover');
		},
		function() {
			$(this).find('h3').removeClass('hover');
			$(this).find('p').removeClass('hover');
	});

	$('.pkg').click(function(){
		window.location=$(this).find('a').attr('href');return false;
	});

	var popupEvent = function(event) {
		var option = 'width=580,height=610,left=0,top=0,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,status=no,location=no,directories=no,addressbar=no';
		window.open(this.href, this.rel, option).focus();
		event.preventDefault();
		event.stopPropagation();
	}
	$('a.qtwindow').each(function(i) {
		$(this).click(popupEvent);
		$(this).keypress(popupEvent);
	});

});

	$(function() {
		//$('#tabsBlock > ul').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 5000);
		$('#tabsBlock').tabs({ fx: { opacity: 'toggle' } }).tabs('rotate', 5000);
	});


