var $j = jQuery.noConflict();

window.onload = function () {
	var container = $j('#gallery');
	var ul = $j('ul', container);
	
	if (ul.html() != null) {
		var galleryWidth = ul.innerWidth() - $j(container).outerWidth();
		if (ul.innerWidth() > 620) {
			$j('.slider-off').addClass('slider').removeClass('slider-off');
			var slider = $j('.slider', container).slider({ 
				 handle: '.handle',
				 minValue: 0, 
				 maxValue: galleryWidth, 
				 slide: function (event, ui) {
					ul.css('left', ui.value * -1);
				 }, 
				 stop: function (event, ui) {
					ul.animate({ 'left': ui.value * -1 }, 500);
				 }
			});
		}
	}
	
	$j('ul.icons li a').mouseover(function(){
		$j(this).parent().parent().children("li.help-text").children('span').text($j(this).attr('title'));
	 });

	$j('ul.icons li a').mouseout(function(){
		$j(this).parent().parent().children("li.help-text").children('span').text('linker');
	 });
};



