$(document).ready(function() {
    $('#head .content .title a').click(function(){
        if ($('#head .content .title a').hasClass('active') == false) {
            $("#head .content").stop().animate({top:'168px'},{queue:false,duration:260});
            $("#head .content .title a").addClass('active');
        } else {
            $("#head .content").stop().animate({top:'282px'},{queue:false,duration:260});
            $("#head .content .title a").removeClass('active');				
        }
    });
    
    $('.boxgrid.caption').hover(function(){
        $(".cover", this).stop().animate({top:'70px'},{queue:false,duration:160});
    }, function() {
        $(".cover", this).stop().animate({top:'113px'},{queue:false,duration:160});
    });
	
	$(".tweetstream").tweet({
		count: 3,
		query: "%40bo_2010"
	});
	
	FB.init("928ebe222a995dbbefa5ddc63ed4b138");
});

function changePanorama(panid) {					
	if (panid == '1') {
		var url = 'http://www.bochum-2010.de/wp-content/themes/bo2010/movies/A401.mov';	
		var movid = 'Panorama_1';
		var poster = 'http://www.bochum-2010.de/wp-content/uploads/2010/07/panorama_1_noqt.jpg';
		$("#pannav_1").addClass('active');
		$("#pannav_2").removeClass('active');
	} else {
		var url = 'http://www.bochum-2010.de/wp-content/themes/bo2010/movies/A402.mov';	
		var movid = 'Panorama_2';
		var poster = 'http://www.bochum-2010.de/wp-content/uploads/2010/07/panorama_2_noqt.jpg';
		$("#pannav_1").removeClass('active');
		$("#pannav_2").addClass('active');
	}

	var myQTObject = new QTObject(url, movid, "784", "300", poster);
	myQTObject.addParam("href", url);
	myQTObject.addParam("target", "myself");
	myQTObject.addParam("controller", "false");
	myQTObject.write('panorama_mov');	 
}

$(function() {
	$('#content_single .gallery a').lightBox({
		overlayBgColor: '#58585A',
		overlayOpacity: 0.8,
		imageLoading: 'http://www.bochum-2010.de/wp-content/themes/bo2010/images/lightbox/loading.gif',
		imageBtnClose: 'http://www.bochum-2010.de/wp-content/themes/bo2010/images/lightbox/close.gif',
		imageBtnPrev: 'http://www.bochum-2010.de/wp-content/themes/bo2010/images/lightbox/prev.gif',
		imageBtnNext: 'http://www.bochum-2010.de/wp-content/themes/bo2010/images/lightbox/next.gif',
		containerResizeSpeed: 350,
		txtImage: 'Bild',
		txtOf: 'von'
	});
});