/**
 * ScrollLayer Player 4 SRMNEW
 */
jQuery(function($) {var Speed=10;var Space=7;var PageWidth=640;var ScrollWidth=160;var fill=0;var MoveLock=false;var MoveTimer;var Comp=0;var AutoPlaySpeed=5000;var AutoPlayTimer=null;var AutoPlayEnabled=false;var AutoPlay=function(){clearInterval(AutoPlayTimer);AutoPlayTimer=setInterval(function(){scrollLayerGoDown();scrollLayerStopDown()},AutoPlaySpeed)};var scrollLayerGoUp=function(){if(MoveLock){return}clearInterval(AutoPlayTimer);MoveLock=true;MoveTimer=setInterval(scrollLayerScrUp,Speed)};var scrollLayerStopUp=function(){clearInterval(MoveTimer);if(fullLayer.scrollLeft()%ScrollWidth-fill!=0){Comp=fill-(fullLayer.scrollLeft()%ScrollWidth);CompScr()}else{MoveLock=false}if(AutoPlayEnabled){AutoPlay()}};var scrollLayerScrUp=function(){if(originLayer.outerWidth()<=PageWidth){return}if(fullLayer.scrollLeft()<=0){fullLayer.scrollLeft(fullLayer.scrollLeft()+originLayer.outerWidth())}fullLayer.scrollLeft(fullLayer.scrollLeft()-Space)};var scrollLayerGoDown=function(){clearInterval(MoveTimer);if(MoveLock){return}clearInterval(AutoPlayTimer);MoveLock=true;scrollLayerScrDown();MoveTimer=setInterval(scrollLayerScrDown,Speed)};var scrollLayerStopDown=function(){clearInterval(MoveTimer);if(fullLayer.scrollLeft()%ScrollWidth-fill!=0){Comp=ScrollWidth-fullLayer.scrollLeft()%ScrollWidth+fill;CompScr()}else{MoveLock=false}if(AutoPlayEnabled){AutoPlay()}};var scrollLayerScrDown=function(){if(originLayer.outerWidth()<=PageWidth){return}if(fullLayer.scrollLeft()>=originLayer.outerWidth()){fullLayer.scrollLeft(fullLayer.scrollLeft()-originLayer.outerWidth())}fullLayer.scrollLeft(fullLayer.scrollLeft()+Space)};var CompScr=function(){var num;if(Comp==0){MoveLock=false;return}if(Comp<0){if(Comp<-Space){Comp+=Space;num=Space}else{num=-Comp;Comp=0}fullLayer.scrollLeft(fullLayer.scrollLeft()-num);setTimeout(CompScr,Speed)}else{if(Comp>Space){Comp-=Space;num=Space}else{num=Comp;Comp=0}fullLayer.scrollLeft(fullLayer.scrollLeft()+num);setTimeout(CompScr,Speed)}};var fullLayer=$('#ISL_Cont').find('.relat').wrap('<div class="outerWrap"></div>').parent().css({'width':PageWidth+'px','overflow':'hidden'});var originLayer=$('#List1'),controlButtons=$('#goleft,#goright');if(originLayer.outerWidth()>PageWidth){originLayer.parent().append(originLayer.clone().attr('id','List2'));fullLayer.scrollLeft(fill);if(AutoPlayEnabled){fullLayer.hover(function(){clearInterval(AutoPlayTimer)},AutoPlay);AutoPlay()}controlButtons.hover(function(){$(this).addClass('hoar')},function(){$(this).removeClass('hoar')});controlButtons.eq(0).mousedown(scrollLayerGoUp).mouseup(scrollLayerStopUp).mouseout(scrollLayerStopUp);controlButtons.eq(1).mousedown(scrollLayerGoDown).mouseup(scrollLayerStopDown).mouseout(scrollLayerStopDown)}else{controlButtons.hide()}});

