$(document).ready(function(){
// delay function
jQuery.fn.delay = function(time,callback) {
	this.each(function() {
		setTimeout(callback,time);
	})
	return this;
};
/*---------- Site - Navigation ----------*/	
	var site = function() {
		this.navLi = $('#navigation li').children('ul').hide().end();
		this.init();
	};
	site.prototype = {
		init : function() {
			this.setMenu();
			},
			setMenu : function() {
			$.each(this.navLi, function() {
				if ( $(this).children('ul')[0] ) {
					$(this)
					.append('<span />')
					.children('span')
					.addClass('hasChildren')
				}
			});
			this.navLi.hover(function() {
				// mouseover
				$(this).find('> ul').stop(true, true).slideDown(200);
			}, function() {
				// mouseout
				$(this).find('> ul').stop(true, true).fadeOut(200); 		
			});
		}
	}
	new site();
/*---------- Site - Navigation end ----------*/	
/*---------- make footer li clickable ----------*/	
	$('#footer ul li, ul#navigation li').click(function(){
		var li_ul = $(this).find('a').attr('href');
		window.location = li_ul;
	});
/*---------- make footer li clickable end ----------*/	
});