$(document).ready(function(){
	$("#open-link").click(function(){  $(".menu-items, #student_menu").fadeOut("fast"); $("div#panel").slideDown("slow");  });	
	$("#close-link").click(function(){ $("div#panel").slideUp("slow",function () { $(".menu-items, #student_menu").fadeIn("slow"); }); });
	$("#toggle a").click(function () { $("#toggle a").toggle(); });

	$('#query-field').focus(function () { $(this).attr("value",""); });
	$("#query-field").blur(function () { $(this).attr("value","חיפוש"); });
	
	$("#logo a img").qtip({
		position: { corner: { target: 'bottomMiddle', tooltip: 'topMiddle' } },
		style: { name: 'light', tip: 'topMiddle', background: '#78BCED', color:'#000', border: { width: 3, radius: 5, color: '#fff' } }
	});
	
	$("#extra-info div.right img").qtip({
		position: { corner: { target: 'leftMiddle', tooltip: 'rightMiddle' } },
		style: { name: 'light', tip: 'rightMiddle', background: '#fff', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	
	$("#extra-info div.left img").qtip({
		position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle' } },
		style: { name: 'light', tip: 'bottomMiddle', background: '#fff', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	$("input.submit").qtip({
		position: { corner: { target: 'topMiddle', tooltip: 'bottomMiddle' } },
		style: { name: 'light', tip: 'bottomMiddle', background: '#fff', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	 $('a[rel="external"]').click( function() {
        window.open( $(this).attr('href') );
        return false;
    });
	
	$(".form-tip").qtip({
		position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } },
		style: { name: 'light', tip: 'leftMiddle', background: '#fff',textAlign: 'right', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	$(".form-required").qtip({
		position: { corner: { target: 'rightMiddle', tooltip: 'leftMiddle' } },
		style: { name: 'light', tip: 'leftMiddle', background: '#fff',textAlign: 'right', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	$(".field_info").qtip({
		position: { corner: { target: 'leftMiddle', tooltip: 'rightMiddle' } },
		style: { name: 'light', tip: 'rightMiddle', background: '#fff',textAlign: 'right', color:'#000', border: { width: 3, radius: 5, color: '#175B8C' } }
	});
	
});

