 /*===============================================================
 *  PrettyPress Javascript Utilities
 *  Author: Jonathan Jackson
 *  Author URL: www.springwebdevelopment.com
 *  Theme URL: www.prettypress.co.uk
 *  Dependencies: mootools 1.2.1 core + more
 *===============================================================*/

	window.addEvent('domready', function() {
										 
										 
		// in page links now scroll instead of jump								 
		new SmoothScroll({ duration:700 }, window);
		
		
		// setup tooltips
		var titleTips = new Tips('.commentLink',{
			className: 'titleTip',
			offsets: {'x': -25,'y': -110}  // -ve y-axis means tooltip goes higher, if its too near link it creates
		});	
		
		var categoryTips = new Tips('.category',{
			className: 'tagTip',
			offsets: {'x': -20,'y': -70}  // -ve y-axis means tooltip goes higher, if its too near link it creates
		});
		
		var tagTips = new Tips('a[class^=tag-link]',{
			className: 'tagTip',
			offsets: {'x': -20,'y': -70}  // -ve y-axis means tooltip goes higher, if its too near link it creates
		});//  flicker when hovering, so set it high enough not to cause this
		
		
		// setup Autocompleter
		var searchField = $('searchField'); 
		new Autocompleter.Local(searchField, tags, {
			'width': 258,
			'minLength': 0,
			'selectMode': 'selection',
			'maxChoices': 25,
			'multiple': false
		});
		
		
	}); // End domReady