$(document).ready(function() {
			/*
				Tips:
				
				event.target is DOM Element
				this is DOM element
				$(this) is jQuery Element
				timer is interval for countdown
				
				If a countdown should end early you could do:
				
				clearInterval( timer );
				$(this).trigger('complete');
			*/	
			

	$("#time").countdown({
		date: "june 1, 2011", //Counting TO a date
		//htmlTemplate: "%{h} <span class=\"cd-time\">hours</span> %{m} <span class=\"cd-time\">mins</span> %{s} <span class=\"cd-time\">sec</span>",
		//date: "july 1, 2011 19:24", //Counting TO a date
		onChange: function( event, timer ){
		


		},
		onComplete: function( event ){
		
			$(this).html("Completed");
		},
		leadingZero: true,
		direction: "up"
	});
	
	//$("#time").countdown();
	



	
	$("#time2").countdown({
		date: "December 28, 2011 13:24",
		//htmlTemplate: "%{h} <span class=\"cd-time\">hours</span> %{m} <span class=\"cd-time\">mins</span> %{s} <span class=\"cd-time\">sec</span>",
		offset: 1,
		onChange: function( event, timer ){
		


		},
		onComplete: function( event ){
		
			$(this).html("本日のLive終了後公開！！");
		},
		onPause: function( event, timer ){

			$(this).html("Pause");
		},
		onResume: function( event ){
		
			$(this).html("Resumed");
		},
		leadingZero: true
	});
	
	//$("#time2").countdown('pause');
	
	//$("#time2").countdown('resume');
	
	
	/*
	$("#time2").countdown({
		date: "may 1, 2011",
		direction: 'up', //Counting FROM a date
		leadingZero: true
	});
	*/

});



/*テスト*/

var o13 = new $.overlay({
	bg_color: 'black',
	opacity: 0.2,
	click_close: false
});

var pageSize = $.overlay.pageSize;
var $block = $('<div></div>')
	.append('<p>画面中央にこのボックスが表示されるよ。<br />$.overlay.pageSizeに現在のwindowサイズあたりが格納されるのでそれを活用。</p>')
	.append('<p style="text-align:center;"><input type="button" value="閉じる" id="o13_close"></p>')
	.css({
		  position: 'absolute'
		, width: 300
		, height: 200
		, padding: 20
		, background: '#ffffff'
		, border: '2px solid #999999'
		, top: (pageSize[3] - 200) / 2 + $(window).scrollTop()
		, left: (pageSize[2] - 300) / 2
	});
o13.$obj.after($block.hide());
$('#o13_close')
	.click(function(){
		$block.hide();
		o13.close();
	});
$(window)
	.resize(function(){
		var pageSize = $.overlay.pageSize;
		$block
			.css({
				  top: (pageSize[3] - 200) / 2 + $(window).scrollTop()
				, left: (pageSize[2] - 300) / 2
			});
	})
	.scroll(function(){
		var pageSize = $.overlay.pageSize;
		$block
			.css({
				  top: (pageSize[3] - 200) / 2 + $(window).scrollTop()
			});
	});

$(document).ready(function(){
	o13.open(function(){
		$block.show();
	});
});
