/*
	Copyright © 14th March 2011 Jake Nicholson (www.eskdale.net)
*/
(function($){$.fn.slideTHIS=function(){var vConst=0.3;var contWidth=$(this).width();var liWidth=$(this).find('.item').width();var liLength=$(this).find('.item').length;var liTot=liWidth*liLength;var wOffset=parseFloat(liTot-contWidth);if(liTot>contWidth){$(this).find('.inner').css({'width':liTot+'px'});$(this).append('<a href="#" class="arrow" id="rightArrow"><img src="/media/common/right-arrow.png" alt="Move Right" width="31" height="32" /></a><a href="#" class="arrow" id="leftArrow"><img src="/media/common/left-arrow.png" alt="Move Left" width="31" height="32" /></a>');$('a#rightArrow').click(function(e){e.preventDefault();});$('a#leftArrow').click(function(f){f.preventDefault();});/*$(this).find('.arrow').fadeTo(400,0.6);$(this).find('.arrow').hover(function(){$(this).stop(true,true).fadeTo(400,1);},function(){$(this).stop(true,true).fadeTo(200,0.6);});*/$('a#leftArrow').hover(function(){var lOff=$('.inner').position();var leftY=lOff.left;var leftYpos=Math.sqrt(Math.pow(leftY,2));var leftT=Math.round(leftYpos/vConst);$('.inner').animate({left:'0px'},leftT,'linear');},function(){$('.inner').stop();});$('a#rightArrow').hover(function(){var rOff=$('.inner').position();var rOffLeft=rOff.left;var rightY=rOffLeft+wOffset;var rightYpos=Math.sqrt(Math.pow(rightY,2));var rightT=Math.round(rightYpos/vConst);$('.inner').animate({left:'-'+wOffset+'px'},rightT,'linear');},function(){$('.inner').stop();});};};})(jQuery);
