$(document).ready(function(){
	$('div.extended').css("display","none").before('<a href="#" class="showclass" style="position: absolute; right: 10px; bottom: 60px;"><span>Show product information</span><span style="display: none">Hide product information</span></a>');
	$('h2.productHeader').css("cursor","pointer");
	$('#exhibition').css("position","relative");
	$('#exhibition a.link').after('<a href="#" class="head" style="position: absolute; left: 5px; top: 0; display: block; width: 20px; height: 20px;"></a>');
	if ($('#exhibition ul li').hasClass('selected')) {
		$('#exhibition a.head').addClass('selected');
	}
	if ($('#exhibition').hasClass('selected')) {
		$('#exhibition a.head').addClass('selected');
	}
});

$(document).ready(function(){
	$("#exhibition").accordion({
	autoHeight: true,
	active: '.selected',
	header: '.head',
	alwaysOpen: false,
	event: 'mouseover',
	animated: 'easeslide'
	});
});

$(document).ready(function(){
	$('a.showclass').click(function() {
 	   $(this).next().slideToggle(800);
	   $(this).children().toggle(1);
    	return false;
 	});

	$('h2.productHeader').click(function() {
	   $(this).siblings("a.showclass").next().slideToggle(800);
	   $(this).siblings("a.showclass").children().toggle(1);
		return false;
	});
	
	$('#jGallery').css("display","none").addClass("java");
	$('.jSc').css("display","none");
	$("h3.usethis").after("<a href='#' class='galButton' style='position: absolute; top:18px; right:20px; color: #fff'>Close X</a>");
	$('.galButton').click(function() {
		$('#jGallery').slideToggle(800);
	});
	
	$('.galButton a').removeAttr('href').css('cursor','pointer');

	
	$('.galButton2').click(function() {
		var useme = '#' + $(this).attr('title');
		$(useme).slideToggle(800);
	});
	
	$('.galButton2').children('a').attr('href','#');
	
	$(function() {
		$('div.gallery a').lightBox();
	});
});

