(function($){
	
	$.namespace = function() {

		var space = $,
			effen = $.fn,
			path = [];
		
		$.each(arguments,function(i,str){
			path.push(str);
			if(typeof space[str] == 'undefined') {
				space[str] = {};
			}
			if(typeof space[str]['fn'] == 'undefined') {
				space[str]['fn'] = {};
			}
			if(typeof effen[str] != 'function') {
				var ext = space[str];
				effen[str] = function() {
					return this.extend(ext['fn']);
				}
			}
			space = space[str];
			effen = space['fn'];
		})
		$.extend(space,{extend:function(o){return $.extend(this,o);}})
		$.extend(space.fn,{extend:function(o){return $.extend(this,o);}})
		return space;
		
	}
	
	$.namespace('ye');
	$.namespace('ye','regions');
	$.namespace('ye','calendar');
	$.namespace('ye','casestudies');
	
	//print page functionality
	$(document).ready(function(){
		$('.jvsPagePrint').click(function(e){
			e.preventDefault();
			window.print();
		});
			
	});
})(jQuery)
