<!--
/* SVN FILE: $Id: qtip.js 62 2010-03-19 15:36:50Z Chris $ */
/**
 * Qtip
 *
 * Adds Qtip to links and form hints
 *
 * @copyright    Copyright 200p PBM Web Development - All Rights Reserved
 * @package      js
 * @since        V1.0.0
 * @version      $Revision: 62 $
 * @modifiedby   $LastChangedBy: Chris $
 * @lastmodified $Date: 2010-03-19 15:36:50 +0000 (Fri, 19 Mar 2010) $
 */
jQuery(document).ready(function(){
	var half = jQuery('html').width()/2;

  jQuery('#content a[title]').each(function(){
		$this=jQuery(this);
	  $this.qtip({
			position: {
				corner: {
					target: $this.offset().left>half?'topLeft':'topRight',
					tooltip: $this.offset().left>half?'bottomRight':'bottomLeft'
				}
			},
			style: {
				background: '#fff',
				color: '#b50f21',
				border: {
					color: '#b50f21',
					radius: 3,
					width: 2
				},
				tip: $this.offset().left>half?'bottomRight':'bottomLeft'
			}
	  });
	});

	jQuery('form div.hint').each(function(){
		$this=jQuery(this);
	  $this.qtip({
	  	content: {
				text: $this.text()
	  	},
			position: {
				corner: {
					target: $this.offset().left>half?'topLeft':'topRight',
					tooltip: $this.offset().left>half?'bottomRight':'bottomLeft'
				}
			},
			style: {
				background: '#fff',
				color: '#b50f21',
				border: {
					color: '#b50f21',
					radius: 3,
					width: 2
				},
				tip: $this.offset().left>half?'bottomRight':'bottomLeft'
			}
	  });
	});
	jQuery('form div.row').hover(function(){
		jQuery(this).find('div.hint').css('display', 'inline-block');
	},
	function(){
		jQuery(this).find('div.hint').css('display', 'none');
	});
});
// -->
