/* Author: Christoph Knoth */

jQuery(document).ready(function(){

	//open the opener div 
	$('#openerdiv').slideToggle(500);

	//function to open al h1s
	$('h1').click(function() {
		$(this).next().slideToggle(500);
		$(this).next().children().css('display', 'block');
		$(this).find('img').attr('href');
	
	//tracking	
		var test = $(this).find('a').attr('id');
		$(this).track({category : test });
		$(this).track({category : 'opening a project' });
		
		return false;
	}).next().hide();
	
	
	//wenn man auf interne Bilder klickt, solls auch wieder zu gehen
	$('.content img').click(function() {
		$(this).parents().filter('.content').slideToggle(500);
	
		return false;
	}).parents().filter('.content').hide();
	
		
	$("a[rel='peanut']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'peanut' }); }
	
		});
		
		$("a[rel='gradient']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'gradient' }); }
	
		});
		
		
		$("a[rel='potraits']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'potraits' }); }
	
		});
		
		
		$("a[rel='altars']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'altars' }); }
	
		});
		
		
		$("a[rel='legends']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'legends' }); }
	
		});
		
				
		
		$("a[rel='gravity']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'gravity' }); }
	
		});
		
				
		$("a[rel='tabvla']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'tabvla' }); }
	
		});
		
						
		$("a[rel='still_sculp_collage']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'still_sculp_collage' }); }
	
		});
			
		$("a[rel='portrait_of_a_woman']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'portrait_of_a_woman' }); }
	
		});
			
				
		$("a[rel='size_matters']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'size_matters' }); }
	
		});
			
		$("a[rel='TIME']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'TIME' }); }
	
		});
			
			
		$("a[rel='scrollbar']").colorbox({
		transition:"none",
		opacity:"1",
		initialWidth:"798px",
		width:"826px",
		innerWidth:"826px",
		
		height:"619px",
		initialHeight:"562px",
		
		scalePhotos:false,
		
		loop:true,
		onOpen:function(){ $(this).track({category : 'scrollbar' }); }
	
		});
			
});




