$(function(){
	$('#impressum').columnize({ columns: 2 });
	$('#kontakt').columnize({ columns: 2 });
	$('#team').columnize({ columns: 2 });
	//$('#buero').columnize({ columns: 2 });
});
$(document).ready(function(){ 

	$('img[title]').each(function() { $(this).removeAttr('title'); });
	$('img[alt]').each(function() { $(this).removeAttr('alt'); });
	
	$('a[title]').each(function() { $(this).removeAttr('title'); });

	
	$('#veroeffentlichungen').tinyscrollbar({ axis: 'x'});


	$(".box img").addClass("filter-greyscale");
	$(".box img").attr('data-pb-greyscale-opacity', '0.5');
	//$(".box img").fadeTo("slow", 0.8);
	$(".box").hover(function(){
		//$("img", this).fadeTo("slow", 0.8);
		$(".box img").attr('data-pb-greyscale-opacity', '0');
		$(".headlines", this).show();
	},function(){
		$(".box img").attr('data-pb-greyscale-opacity', '0.5');
		//$("img", this).fadeTo("slow", 1);
		$(".headlines", this).hide();
	});


	$("#projekte .box").hover(function(){
		$("img", this).fadeTo("slow", 1);
		$(".headlines", this).fadeTo("slow", 1);
	},function(){
		$("img", this).fadeTo("slow", 1);
		$(".headlines", this).fadeTo("slow", 1);
	});
	
	/*

	$('#veroeffentlichungen').mousedown(function (event) {
		$(this)
			.data('down', true)
			.data('x', event.clientX)
			.data('scrollLeft', this.scrollLeft);
		return false;
	}).mouseup(function (event) {
		$(this).data('down', false);
	}).mousemove(function (event) {
		if ($(this).data('down') == true) {
			this.scrollLeft = $(this).data('scrollLeft') + $(this).data('x') - event.clientX;
		}
	}).css({
		'overflow' : 'hidden',
		'cursor' : '-moz-grab'
	});
	
	*/
	
	
	
	
});

/*
$(window).mouseout(function (event) {
	if ($('#veroeffentlichungen').data('down')) {
		try {
			if (event.originalTarget.nodeName == 'BODY' || event.originalTarget.nodeName == 'HTML') {
				$('#veroeffentlichungen').data('down', false);
			}
		} catch (e) {}
	}
});
*/
