$(document).ready(function(){

	/*$('figure').flash({
		src: 'media/flash/lines_bowl.swf',
		width: 980,
		height: 434,
		wmode: 'transparent',
		loop: false
	});
	
	/* homepage articles on click*/	
	$("#p-home article").click(function(){
		var goto = $(this).find('a').attr('href');
		 window.location=goto;
		 return false;
	});
	
	
	/* open new windows for external links */
	$(function() {
		$('a[rel^=external]').click( function() {
			window.open(this.href);
			return false;
		});
	});
	
	/* work */
	
	$('.work li img').fadeTo(0, 0.2); 
	
	$('.work li img').hover(
		//on
		function(){
			$(this).stop().fadeTo(200, 1);
		},
		//off
		function(){
			$(this).stop().fadeTo('slow', 0.2);
		}
	);
	
	/* nudge menu */
	
	$('li h1.show-more').toggle(
		function() {
			$(this).parent().find('.extra').slideDown('slow');
			$(this).css({'background-image':'url(/img/minus.png)'});
		}, 
		function() {
			$(this).parent().find('.extra').slideUp('slow');
			$(this).css({'background-image':'url(/img/plus.png)'});
		}	
	);
	
	/* read more news 
	
	$(".article-box a").removeAttr('href');	
	
	function dataLoader(data) {
		//push data into position
		$(".article-box a").before(data);
	}
	
	$(".article-box a").click(function(){
		//find id to load	
		var id = $(this).attr('id');
		//load data
		$.get('inc/article_block.php?id=' + id, dataLoader);		
		//change id
		id++;
		$(this).attr('id', id);
	});
	
	$('article a').hover(
		//on
		function(){
			$(this).animate({ "margin-top": "2px"}, 'fast');
		},
		//off
		function(){
			$(this).animate({ "margin-top": "0"}, 0);
		}
	);*/
//$(this).animate({"margin-left": "0px"}, "slow");

});
