$(document).ready(function() {
	
	$(function(){$('#header ul a').collapsor({});});
	$(function(){$('#news ul a').collapsor({});});

	$('#gallery')
		.cycle ({ 
		fx:     'fade', 
		speed:  1000, 
		timeout: 2300, 
	    pause:   4500, 
		easing: 'swing',
		next: '.images-next',
		prev: '.images-prev'
	});	
			
	$('a.more').hoverAnim({backgroundColor: "#9648ff"},{easing: 'swing', sensitivity: 200, timeout: 100, interval: 20, speed: 450});
	$('.thumb .thumb_img').hoverAnim({opacity: 0},{easing: 'swing', sensitivity: 200, timeout: 50, interval: 2, speed: 450});
	$('.thumb img').hoverAnim({opacity: 0},{easing: 'swing', sensitivity: 200, timeout: 50, interval: 2, speed: 450});
	$('#footer').hoverIntent( function() {  $(".contact").animate({opacity: 1},100);} , function() {  $(".contact").animate({opacity: 0},150);} );
	$('#project_gallery_wrapper.normal').hoverAnim({height: 455},{easing: 'swing', sensitivity: 200, timeout: 450, interval: 450, speed: 450});
	$('#project_gallery_wrapper.extra').hoverAnim({height: 521},{easing: 'swing', sensitivity: 200, timeout: 450, interval: 450, speed: 850});
	$('a#image-overlay-next').hoverAnim({borderBottomColor: "#9648ff"},{easing: 'swing', timeout: 450, interval: 250, speed: 850});

	
	$(function() {
	    $('#project_gallery')
	    	.before('<a class="images-next" id="image-overlay-next" href="#">&nbsp;</a>')
	    	.after('<ul id="thumbnails"></ul><div style="clear:both;">&nbsp;</div>')
	    	.cycle({
	        fx:     'fade',
	        speed:  500,
	        timeout: 0,
	        next: '.images-next',
	        pager: '#thumbnails',
	        pagerAnchorBuilder: function(idx, slide) {
	            return '<li><a class="project_thumbnail" href="#"><img src="' + slide.src + '" width="50" height="50" /></a></li>';
	        }
	    });
	});
	

	
});

