// Place your application-specific JavaScript functions and classes here
// This file is automatically included by javascript_include_tag :defaults
$(function() {
 $('.left_menu .block-top > ul > li').click(function(event) {

    if (!$(event.target).is('.level_one'))
       return; 
	   
	 if ($(this).is('.active')) {
		$(this).removeClass('active');
	 } else {
			$(this).parents('ul').find('.active').removeClass('.active');
			$(this).addClass('active');
	 }

 return false;
});

	$('.dropdown').each(function () {
		$(this).parent().eq(0).hover(function () {
			$('.dropdown:eq(0)', this).slideDown(50);	
		}, function () {
		$('.dropdown:eq(0)', this).slideUp(50);
	});


	$('form').submit(function() {
		var q = $('input[name=q]');
		q.val($('input[name=r]').val() + ' site:http://processia.com'); });
		$('input[name=r]').example(function() { return $(this).attr('title'); }); 
	});
});