function dom_init() {


	$('html').css('background-color','#222');
	
	// ****************** TABS & FILTER ****************** //

	// CHECK URL FOR HASH
	var hash = location.hash;
	if (hash) {		
		// CHECK IF HASH IS A VALID FILTER > SET FILTER
		var filterCheck = $('#filter a[href = ' + hash + ']').length;
		if(filterCheck = 1) {
			filter(hash);
		}
		// CHECK IF HASH IS A VALID TAB > SET TAB
		var tabCheck = $('#tabs a[href = ' + hash + ']').length;
		if(tabCheck = 1) {
			var tabId = $('#tabs a[href = ' + hash + ']').attr('id');
			setTab(tabId);
		}
	}


	// TAGFILTER
	$('#filter a').click(function() {
		var tag = $(this).attr('href');
		filter(tag);
	});
	
	
	// SWITCH TAB CONTENT
	$('a[id^=Tab]').click(function() {
		var tabId = $(this).attr('id');
		setTab(tabId);
	});
	
	
	
   	// CLIENTLIST HOVER FADES
	$(".teaserlist li").hover(
		function () {
			$(this).find('.gotoIcon').animate({
				opacity: 1,
				right: '+=25px'
			}, 200, 'linear', function() {});
		},
		function () {
			$(this).find('.gotoIcon').animate({
				opacity: 0,
				right: '-=25px'
			}, 200, 'linear', function() {});
		}
	);
	
	

	// ****************** FANCYBOX ****************** //	
	
	$(".fancybox").fancybox({
		openEffect : 'elastic',
		closeEffect : 'elastic',
		// PRELOAD ALL IMAGES
		afterShow: function(){
			$.each( $('.fancybox') , function(){
				var imageLink = $(this).attr('href');
				$('body').append('<div style="display: none;"><img src="'+imageLink+'"</div>');
			});
		}
	});
	


	// ****************** SLIDES : CYCLE ****************** //
	
	$('#slideshow').cycle({ 
		fx:      		'scrollHorz',
		next:   		'#nextslide',
		prev: 			'#prevslide',
		speed:  		460,
		easing:			'swing',
		timeout: 		0
	});

	
	
	
	// ****************** SLIDES : NIVOSLIDER ****************** //
	
	// TEASER SLIDES
    $('#teaserSlides').nivoSlider({
        effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
        animSpeed: 500, // Slide transition speed
        pauseTime: 6000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: true, // Next & Prev navigation
        directionNavHide: false, // Only show on hover
        controlNav: true, // 1,2,3... navigation
        controlNavThumbs: false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel: false, // Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', // Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
        keyboardNav: true, // Use left & right arrows
        pauseOnHover: true, // Stop animation while hovering
        manualAdvance: false, // Force manual transitions
        captionOpacity: 0.9, // Universal caption opacity
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
    
    // ADD ANN ICON-ELEMENT TO THE NIVO-CAPTION
    $('.nivo-caption').append('<span class="nivo-caption-icon"></span>');
    
    
	// SWITCH TAB CONTENT
	$('.nivo-caption').click(function() {
		var slideLink = $('#teaserSlides a:visible').attr('href');
		window.location.href=slideLink;
	});


		
	// PRODUCT SLIDES
    $('#slider').nivoSlider({
		effect: 'fade', // Specify sets like: 'fold,fade,sliceDown'
        slices: 15, // For slice animations
        boxCols: 8, // For box animations
        boxRows: 4, // For box animations
        animSpeed: 500, // Slide transition speed
        pauseTime: 5000, // How long each slide will show
        startSlide: 0, // Set starting Slide (0 index)
        directionNav: true, // Next & Prev navigation
        directionNavHide: false, // Only show on hover
        controlNav: true, // 1,2,3... navigation
        controlNavThumbs: false, // Use thumbnails for Control Nav
        controlNavThumbsFromRel: false, // Use image rel for thumbs
        controlNavThumbsSearch: '.jpg', // Replace this with...
        controlNavThumbsReplace: '_thumb.jpg', // ...this in thumb Image src
        keyboardNav: true, // Use left & right arrows
        pauseOnHover: true, // Stop animation while hovering
        manualAdvance: false, // Force manual transitions
        captionOpacity: 0.8, // Universal caption opacity
        prevText: 'Prev', // Prev directionNav text
        nextText: 'Next', // Next directionNav text
        beforeChange: function(){}, // Triggers before a slide transition
        afterChange: function(){}, // Triggers after a slide transition
        slideshowEnd: function(){}, // Triggers after all slides have been shown
        lastSlide: function(){}, // Triggers when last slide is shown
        afterLoad: function(){} // Triggers when slider has loaded
    });
    

    
    
    // ADD SOME ADDITIONAL STYLING-ELEMENTS TO THE AUDIO PLAYER
    $('.audiojs .play-pause p').append('<span></span>');

	

	


	// ****************** TIPSY : TOOLTIPS ****************** //	
	
	$('.tipsy-ne').tipsy({
		gravity: 'ne',
		delayIn: 100,
		delayOut: 200,
		opacity: 1,
		offset: 10
	});
	
	$('.tipsy-sw').tipsy({
		gravity: 'sw',
		delayIn: 100,
		delayOut: 200,
		opacity: 1,
		offset: 10
	});
	
	$('.tipsy-se').tipsy({
		gravity: 'se',
		delayIn: 100,
		delayOut: 200,
		opacity: 1,
		offset: 10
	});
	
	$('.tipsy-s').tipsy({
		gravity: 's',
		delayIn: 0,
		delayOut: 0,
		opacity: 1,
		offset: -45
	});
	

    
    
}



// TAGFILTER
function filter(tag) {

	var tagClass = tag.substring(1, tag.length);

	$('#filter li').removeClass('active');
	$('#filter a[href = ' + tag + ']').parent('li').addClass('active');

	$('#filterlist li').hide();
	$('#filterlist li[class *= ' + tagClass + ']').fadeIn(400);

}


// SET TAB
function setTab(tabId) {
	var activeTabContent = 'content' + tabId;
	$('#tabs li').attr('class','');
	$('#tabs').find('a[id='+tabId+']').parent('li').addClass('active');
	$('[id^=contentTab_]').hide();
	$('#'+activeTabContent).show();
}





