function include_dom( script_filename ) {

    var html_doc = document.getElementsByTagName('head').item(0);
    var js = document.createElement('script');
    js.setAttribute('language', 'javascript');
    js.setAttribute('type', 'text/javascript');
    js.setAttribute('src', script_filename);
    html_doc.appendChild(js);
    return false;
}

function include(script_filename) {
    document.write('<' + 'script');
    document.write(' language="javascript"');
    document.write(' type="text/javascript"');
    document.write(' src="'+ DIR_JS + script_filename + '">');
    document.write('</' + 'script' + '>');
}

include( 'swfobject_modified.js' );



$( document ).ready( function() {
	generateMenu();
	generateMenuTop();
	generateMenuLeft();
	generateList();
} );	

function generateMenu(){
	$("ul#menu_horizontal li").click( 
	   function() {	location = $( this ).find( 'a' ).href( ) ;  }
	);

	$("ul#menu_horizontal li").hover( 
		function() {
  		 $( this ).find( 'img' ).src( DIR_IMG + $( this ).id() +'-c.gif' );
       }, 
	   function() {
 		 $( this ).find( 'img' ).src( DIR_IMG + $( this ).id() +'.gif' );
		} 
	);
}

function generateMenuTop(){
	$("ul#menu_top li").click( 
	   function() {	location = $( this ).find( 'a' ).href( ) ;  }
	);

	$("ul#menu_top li").hover( 	   
		function() {
  			$( this ).addClass( 'activ' );
		},
		function() {
			$( this ).removeClass( 'activ' );
		}
	);
}

function generateMenuLeft(){
	$("ul#menu_left li").click( 
	   function() {	location = $( this ).find( 'a' ).href( ) ;  }
	);

	$("ul#menu_left li").hover( 	   
		function() {
  			$( this ).addClass( 'active' );
		},
		function() {
			$( this ).removeClass( 'active' );
		}
	);
} 

function generateList(){
	$("div.list").click( 
	   function() {	
			if( url= $( this ).find( 'a' ).href( ) )  location = url; 
	   }
	);

	$("div.list").hover( 	   
		function() {
  			$( this ).addClass( 'active' );
//			$( this ).find( 'a' ).addClass( 'active' );

		},
		function() {
			$( this ).removeClass( 'active' );
//			$( this ).find( 'a' ).removeClass( 'active' );
		}
	);
} 

