$(document).ready(function(){ $('.scrollpane .scroll-width ul:last').addClass('last'); $('.scrollpane .scroll-width').css( { width : ( $('.scrollpane ul').length * 240 ) - 45 } ); $('.scrollpane').jScrollPane( { showArrows: true } ); $('.menu li.exp').hover( function(){ if ( ( $(this).position().left + 302 ) > 1024 ) { hoverElWidth = $(this).width(); subMenuLeftPosition = 302 - hoverElWidth + 23; $( '.sec-level', this ).css( { 'left' : -subMenuLeftPosition } ); //alert( $( '.sec-level', this ).position().left ); } }) $("#emitent_name").autocomplete(_root+"helpserv/emitent/", { delay:5, minChars:2, matchSubset:1, autoFill:false, matchContains:1, cacheLength:10, selectFirst:false, formatItem:liFormat, maxItemsToShow:10 //onItemSelect:selectItem }); function liFormat (row, i, num) { var result = row[1]; return result; } function selectItem(li) { //var sValue = li[1]; //alert( li ); //alert("������� ������ � ID: " + sValue); //if( li == null ) var sValue = li.extra[1]; //if( !!li.extra ) var sValue = li.extra[1]; //else var sValue = li.selectValue; //alert("������� ������ � ID: " + sValue); } if ( $('.top-news-wrap') ) { $('.top-news-wrap').jcarousel({ visible:3, scroll:1 }); } $('.sys-bar .time').jclock(); // $('.scrollpane table').jScrollHorizontalPane({ // showArrows:true, // scrollbarHeight:10, // scrollbarMargin:0 // }); $('body').find('.em-dep-list li a.em').bind('click',function(){ $('body').find('.em-dep-list li.current').removeClass('current'); $(this).parent().addClass('current'); $(this).find('.em_dep_info').show(); return false; }) $('.docs_arch a.more').click( function(){ $('.docs_arch_links').show(); return false; }); $('.tabs a').click( function(){ //$('.directories_overlay').show(); $('.tabs li').removeClass('active'); $(this).parent('li').addClass('active'); $('.directories div[id]').addClass('hide'); $('.directories #'+ $(this).attr('rel') ).removeClass('hide') //$('.directories_overlay').hide(); return false; }); $('.footer .kp').click(function(){ $('#map').show(); $('#overlay').css('opacity', 0.9).show(); map.redraw(); return false; }); $('#map .close').click(function(){ $('#map').hide(); $('#overlay').hide(); return false; }); })