$(document).ready(function() { new SYSTEM('./api.php',1,'start'); tabs(); search(); FB.XFBML.parse(document.body); }); function search(){ $("#nav_search_btn").click(function(){ $('#contentframe').load('./?page=search¶m='+$('#nav_search').val()); }); $(document).keypress(function(e) { var hasFocus = $('#nav_search').is(':focus'); if(e.which === 13 && hasFocus) { $('#contentframe').load('./?page=search¶m='+$('#nav_search').val()); } }); } function tabs(){ $("#tabs_user_list a").click(function(){ $('#tabs_user_list li').each(function(){ $(this).removeClass('active');}); $(this).parent().addClass('active'); //system.load('start;filter.'+$(this).attr('filter')); //btn_element(); }); } /*function btn_element(){ $(".list_element").click(function(){ system.load('article;article.'+$(this).attr('text_id')) //load_element($(this).attr('text_id')); }); } function load_element(text_id){ $('#contentframe').load('./?page=get_element&text_id=' + text_id, function(){ }); } function load_list(filter){ $('#contentframe').load('./?page=get_list&filter=' + filter, function(){ btn_element(); }); }*/