/* ----------------------------------------------------------------------- */
/* --- machina.co.uk 2010  ----------------------------------------------- */
/* ----------------------------------------------------------------------- */

var deus = {};

(function() {
	if ("jQuery" in window && 'deus' in window) { 
		
		deus.core = {

			//var1 : "function #1",
			//var2 : "function #2", 
		
			init : function() {
				
				deus.core.bindEvents();
			},	
	
			bindEvents : function() {
			
				$( "ul.menu .tog a").click(function(event){
				
					event.preventDefault();
					$(this).parent().next("ul.sm").animate({height:'toggle'}, 'fast', 'swing', function() {
						$(this).closest("li").removeClass("on").addClass("on");
					})
				});
				
				$( ".moreinfo a").click(function(event){
				
					event.preventDefault();
					$(".info").animate({height:'toggle'}, 'fast', 'swing', function() {

					})
					
				});
			
			}
    	};
		
		jQuery(function($) {

			deus.core.init();
    		
 		});
	}
})();

/* ----------------------------------------------------------------------- */


/* Legacy code to be cleaned up at some point */

	function windowOpener( path, winName, width, height ) {
		width = width + 20
		height = height + 30
		window.open( path, winName,"width="+width+",height="+height+",status=0,toolbar=0,location=0,directories=0,menubar=0,scrollbars=1,resizable=0,copyhistory=0,top=0,left=0")
    }




