var sc1 = null;

var testProps = {width: 0.2, color: '#a8a8a8'};
if($.browser.msie){
	var testProps = {width: 0.2, color: '#555'};
}
$(window).bind('load', function(){
	var canvas_1 = document.createElement('div');
	var canvas_2 = document.createElement('div');
	var allCanvas = [canvas_1, canvas_2];
	$(allCanvas).each(function(i){
		var n = i + 1;
		$(this).addClass('canvas').attr('id','canvas_'+ n);
	});

	$('div.plan div.img').append($(allCanvas));
	//sc1 = new SimpleCanvas(canvas_1);
	sc2 = new SimpleCanvas(canvas_2);
	
	//sc1.drawLine ({x: 0, y: 0}, {x: '100%', y: '100%'}, testProps);
	sc2.drawLine ({x: 0, y: 0}, {x: 0, y: '100%'}, testProps);
	
	//sc1.repaint();
	sc2.repaint();

	//$(canvas_1).css('zoom', 1);
	$(canvas_2).css('zoom', 1);
	
});

$(function(){
	var textBlock = $('div.about_room');
	$('div.gallery div.crop a i').click(function(){
		 //textBlock.addClass('hidden');
		textBlock.css('z-index',1);
		if($.browser.msie){
			textBlock.css({opacity:0.3, height: 500});
			
		} else {
			$t(textBlock).tween({opacity: 0.3, time: 0.2});
		}
	});
	
	$('div.plan a.captions').click(function(){
		 //textBlock.addClass('hidden');
		textBlock.css('z-index',1);
		if($.browser.msie){
			textBlock.css({opacity:0.3, height: 500});
			
		} else {
			$t(textBlock).tween({opacity: 0.3, time: 0.2});
		}
	});
	
	$('ins.gal_close').click(function(){
		// textBlock.removeClass('hidden');
		if($.browser.msie){
			textBlock.attr('style','');
			textBlock.css({height: 1});
		} else {
			$t(textBlock).tween({opacity: 1, time: 0.2,
				onComplete: function(){
							textBlock.attr('style','');
						}
			});
		}
		textBlock.css('z-index',3);
		
	});
});

