/* THIS FILE IS AUTOMATICALLY GENERATED */

$(function(){

	$('img.round').each(function () {
		var img = this;
		var width = $(img).attr('width');
		var height = $(img).attr('height');
		var src = $(img).attr('src');
		
		var roundedImage = $('<div class="img rounded"></div>');
		$(roundedImage).css({
			height: height,
			width: width,
			background: 'url('+ src +')'
		});
		$(img).replaceWith(roundedImage);
	});

	$('.filter ul').each(function () {
		var ul = this;
		var links = $(ul).find('li[class!="current"]');
		links.hide();
		$(ul).hover(
			function () {
				links.slideDown(100);
			},
			function () {
				links.slideUp(100);
			}
		);
	});
	
	$('.three').each(function () {
		$(this).find('.column').filter(function (i) {
			if (i % 3 == 0) {
				$(this).css({'margin-left':'0'});
			}
		});
	});
	$('.four').each(function () {
		$(this).find('.column').filter(function (i) {
			if (i % 4 == 0) {
				$(this).css({'margin-left':'0'});
			}
		});
	});
	$('.twelve').each(function () {
		$(this).find('.column').filter(function (i) {
			if (i % 12 == 0) {
				$(this).css({'margin-left':'0'});
			}
		});
	});
	$('table h3:first').css({'padding-top':'0'})
	
	// frontpage slideshow
	$('#slideshow').cycle({
		'timeout': 5000
	});
});


