/* Declare a namespace for the site */
var Site = window.Site || {};

/* Create a closure to maintain scope of the '$'
   and remain compatible with other frameworks.  */
(function($) {

	//same as $(document).ready();
	$(function() {

		$('a.ext').click(function(){
			// open in a new window
			window.open(this.href);
			return false;
		});

		$('#menu-control').click(function(){
			$('header').toggle(0,changeButton);
		});

		function changeButton(){
			var bgpos = $("#menu-control").css('background-position');
			if (bgpos == '100% 0%') {
				$("#menu-control").css('background-position','100% 100%');
			} else {
				$("#menu-control").css('background-position','100% 0%');
			}
		}

		$('#showlinks').click(function(){
			$('a').css('border','1px dashed #61284b');
		});

		$('.portfolio .showfull').fancybox();
	});

})(jQuery);
