// remap jQuery to $
(function($){

	$(function(){
		$('form.uniForm').uniform({
			prevent_submit : true
		});
	});
	
	// wait until document is fully scriptable
	$(function() {
	
		// select #flowplanes and make it scrollable. use circular and navigator plugins
		$("#flowpanes").scrollable({ circular: true, mousewheel: true }).autoscroll({ interval: 8571 }).navigator({
	
			// select #flowtabs to be used as navigator
			navi: "#flowtabs",
	
			// select A tags inside the navigator to work as items (not direct children)
			naviItem: 'a',
	
			// assign "current" class name for the active A tag inside navigator
			activeClass: 'current',
	
			// make browser's back button work
			history: true
	
		});
	});
	
	(function ($) {
		// VERTICALLY ALIGN FUNCTION
		$.fn.vAlign = function() {
			return this.each(function(i){
			var ah = $(this).height();
			var ph = $(this).parent().height();
			var mh = Math.ceil((ph-ah) / 2);
			$(this).css('margin-top', mh);
			});
		};
	})(jQuery);
	
	$(document).ready(function(){
		$(".description").vAlign();
	});
	

})(window.jQuery);



