
 
/*======================================================FOR MENU DISPLAY==========================================================*/
//$(document).ready(function(){

////custom select box
//	if( $('.selectOption').length > 0 ) $('.selectOption').selectbox();
//	
//	$("#topNav li").hover(
//						  function(){$(this).find('ul').slideDown("fast");},
//						  function (){$(this).find('ul').slideUp("fast");}
//						  );
//	
//	$(".eventList dt").parent().find("dd:even").addClass("even");
//	$(".eventList dd").hover(function(){$(this).addClass("hover");}, function (){$(this).removeClass("hover");});
//	
//	$(".option li").click(
//		function(){
//			var index=$(".option li").index(this);
//			var allBtns =$(".option li");
//			var allTabs =$(".event li");
//			
//			$(allTabs).hide();
//			$(allTabs[index]).fadeIn();
//		}
//	);
//
// });

/*======================================================FOR MENU DISPLAY==========================================================*/
var intervalId, curBnr = 0;
var scrollOverflowHideChild, scrollID1, overFlowWidth, curPos = 0, eachBoxWidth;

$(document).ready(function () {
    //SCROLLING:
    eachBoxWidth = $('#scrollOverflowHide ul li:first').outerWidth() + 5; // 17=="margin-right"
    scrollOverflowHideChild = eachBoxWidth * $('#scrollOverflowHide ul li').length;
    overFlowWidth = scrollOverflowHideChild - $('#scrollOverflowHide').width(); //alert(overFlowWidth);
    $('#scrollOverflowHide ul').css('width', scrollOverflowHideChild + 'px');


    if (overFlowWidth > 0) {
        //HOVER SCROLL:
        /*$('.left, .right').hover(
        function(){
        if($(this).is('.left')){
        scrollID=setInterval('scrollFeature(-1)',5);}
        else
        scrollID=setInterval('scrollFeature(+1)',5);
        },
        function(){clearInterval(scrollID)}
        );*/


        //CLICK SCROLL:
        var direction, tempCurPos;
        $('.left_scoller, .right_scoller').click(function () {
            //alert('uzzal');
            //direction set:
            direction = $(this).is('.left_scoller') ? -1 : +1;

            if (!((curPos == 0 && direction == 1) || (curPos == -overFlowWidth && direction == -1)))
                curPos += (eachBoxWidth * direction);

            if (0 < curPos || curPos < -overFlowWidth)
                curPos = (0 < curPos) ? 0 : -overFlowWidth + 1;

            if (tempCurPos != curPos)
                $('#scrollOverflowHide ul').animate({ left: curPos }, 400);
            tempCurPos = curPos;
        });
    }


});









	





	
