Shadowbox.loadSkin('klauke', '../js/shadowbox/skin');
Shadowbox.loadPlayer('img', '../js/shadowbox/player');
$(document).ready(function() {
var active = 1;
var count = $('div.slideshow div a').size();
$('div.slideshow div').css('width',(count*100)+'px');
$('div.counter_de').text('Zubehör '+active+'/'+count);
$('div.counter_en').text('Acc. '+active+'/'+count);
$('a.right').click(function() {
		if (active < count) {
			$('div.slideshow div').animate({left:(-(active*100))+'px'},'slow');
			active++;
			$('div.counter_de').text('Zubehör '+active+'/'+count);
			$('div.counter_en').text('Acc. '+active+'/'+count);
		}
		return false;
});
$('a.left').click(function() {
		if (active > 1) {
			active--;
			$('div.slideshow div').animate({left:(-(active*100)+100)+'px'},'slow');
			$('div.counter_de').text('Zubehör '+active+'/'+count);
			$('div.counter_en').text('Acc. '+active+'/'+count);
		}
		return false;
});
$('a.tooltip').hover(function(e) {
	this.t = this.title;
	this.title = '';
	$('body').append('<div id="tooltip">'+ this.t +'</div>');
	$('div#tooltip').css('top',(e.pageY - 20) + 'px').css('left',(e.pageX - $('div#tooltip').width() - 15) + 'px').fadeIn('fast');
},
function() {
	this.title = this.t;
	$('div#tooltip').remove();
});
$('a.tooltip').mousemove(function(e) {
	$('#tooltip').css('top',(e.pageY - 20) + 'px').css('left',(e.pageX - $('div#tooltip').width() - 15) + 'px');
});
Shadowbox.init({
	animSequence: 'sync',
	initialHeight: 500,
	initialWidth: 500,
	overlayOpacity: 0.85
});
});
