if(!gallery_default_active_panel) {
	var gallery_default_active_panel = 0;
}

jQuery(document).ready(function(){
	
	if(gallery_default_active_panel == -1) {
		$('dl.danteproduct dt').click(function() {
			$(this).toggleClass('active').next().toggleClass('active').slideToggle('fast');
			return false;
			
		}).addClass('active')
			.next().eq(0)
				.addClass('active');
	} else {
		$('dl.danteproduct dt').click(function() {
			$(this).toggleClass('active').next().toggleClass('active').slideToggle('fast');
			return false;
		}).nextAll('dd').hide();
		
		$('dl.danteproduct dt').eq(gallery_default_active_panel)
			.addClass('active')
			.next().eq(0)
				.addClass('active')
				.show();
	}
	// lightbox
	$("a[rel^='prettyPhoto']").prettyPhoto({theme: 'dark_square', opacity: .65});
	
	//danteproduct
	$('body').append('<p id="tooltip" style="display:none;position:absolute">&nbsp;</p>');
	$('dl.danteproduct .item').children('a').hover(function(e) {
		if(this.title) {
			this._title = this.title; //this.title = '';
			$("#tooltip").text(this._title);
			$("#tooltip")
				.css("top",(e.pageY - 10) + "px")
				.css("left",(e.pageX + 20) + "px")
				.fadeIn("fast");
		} else { $("#tooltip").hide(); }
	}, function(){
		if(this._title) {
			this.title = this._title;		
			$("#tooltip").hide();
		}
    });
});




var gopage = function(url) {
	location.href=url;
}


