//$(document) .ready(function () {

//var content_height = $('#container').height();
//var body_height = $('body').height();
//var footer_top = $('#footer').position();


//$('#right-sidebar').height(content_height + 100);


//});

$(document) .ready(function() {
		$("#tabs").tabs();
	});
	
	$(document) .ready(function() {
		$("#tabs2").tabs();
	});

$(document) .ready(function() {
		$("#element_list").listnav({
		initLetter: 'a',
		noMatchText: 'Nothing matching elements found for that letter.'
		
		});
	});
	
	$(document) .ready(function() {
		$("#attribute_list").listnav({
		initLetter: 'a',
		noMatchText: 'Nothing matching attributes found for that letter.', 
		
		});
	});


$(document) .ready(function () {

    $('div.switch_close') .click(function () {
    
    		$('div.switch_close').hide();
    	  $('div.switch_open').show();
    	 $('#sidebar_content').hide();
        $("#right-sidebar").animate({width: 1}, 10);
        $('#content').css({'margin-right' : '35px'});
		//$('#sidebar_switch').css({'background' : 'url(assets/images/open_aqua.gif) no-repeat right top'});
		
    });
    });
    
        $(document) .ready(function () {

    $('div.switch_open') .click(function () {
		
		$('div.switch_open').hide();
		$('div.switch_close').show();
    //	$('#sidebar_switch').css({'background' : 'url(assets/images/close_aqua.gif) no-repeat right top'});
    	$('#content').css({'margin-right' : '260px'});
        $("#right-sidebar").animate({width: 230}, 100);
        $('#sidebar_content').show();
});
});


$(document) .ready(function () {

    $('#tei_modules_list li a') .click(function () {
    
    	  var moduleName = $(this).text();
    	  var moduleID = $(this).attr('module_id');
    
 		var load_div = $('#modules_right_div');
 		
 		var link_position = $(this).position();
 		
    $.get('includes/tei_module_details.inc.php', {module_name: moduleName, module_id: moduleID}, function (data) { 
    $(load_div).html(data);
   });
 		
 		$('#tei_modules_list li a').css({'text-decoration' : 'none', 'color' : '#779eab'});
 		$(this).css({'text-decoration' : 'underline', 'color' : '#555555'});
 		
		
    });
    });
    
    $(document) .ready(function () {

    $('#tei_elements_list li a') .click(function () {
    
    	  var elementName = $(this).text();
    	  var elementID = $(this).attr('element_id');
    
 		var load_div2 = $('#elements_right_div');
 		
 		var link_position = $(this).position();
 		
 		//$(load_div2).append(elementName);
 		
    $.get('includes/tei_element_details.inc.php', {element_name: elementName, element_id: elementID}, function (data) { 
    $(load_div2).html(data);
   });
 		
 		$('#tei_elements_list li a').css({'text-decoration' : 'none', 'color' : '#779eab'});
 		$(this).css({'text-decoration' : 'underline', 'color' : '#555555'});
 		
		
    });
    });
    
      $(document) .ready(function () {

    $('#tei_attributes_list li a') .click(function () {
    
    	  var attributeName = $(this).text();
    	  var attributeID = $(this).attr('attribute_id');
    
 		var load_div3 = $('#attributes_right_div');
 		
 		var link_position = $(this).position();
 		
 		//$(load_div3).append(attributeID);
 		
    $.get('includes/tei_attribute_details.inc.php', {attribute_name: attributeName, attribute_id: attributeID}, function (data) { 
    $(load_div3).html(data);
   });
 		
 		$('#tei_attributes_list li a').css({'text-decoration' : 'none', 'color' : '#779eab'});
 		$(this).css({'text-decoration' : 'underline', 'color' : '#555555'});
 		
		
    });
    });
    

    
    
