window.addEvent('domready', function() {
	//tip for type
	tipType();
});

var sortSearch = function() {
	var page = 1;
	var Order = $('Order').getSelected()[0].value;
	this.location = '/fleet-by-'+Order+'-0'+'-'+page+'.html';
};

//tips for info in fleet and search
var tipType = function() {
	$$('.YachTypeImg').each(function(el) {
		var full_title = el.getProperty('title');
		if(full_title) {
			var dual = full_title.split('::');
			var tip_title = dual[0].trim();
			var tip_text = dual[1].trim();
			el.store('tip:title', tip_title);
			el.store('tip:text', tip_text);
		}
	});
	// Tips
	var tipsYachtType = new Tips('.YachTypeImg', {
		className: 'Thumbnails',
		showDelay: 20,
		hideDelay: 20,
		onShow: function(tipYT) {
			tipYT.set('tween', {duration: 250}).fade('in');
		},
		onHide: function(tipYT) {
			tipYT.set('tween', {duration: 250}).fade('out');
		}
	});
};


