//			var outerLayout, middleLayout, innerLayout;
			$(function(){
				//Video Player
				function setVideoHeight(){
					if($.browser.mozilla) {
						var flash_video_new_height = parseInt( ( $('#tensid_hd_player_nested').width() ) / 1.777778 );
						var qt_video_new_height = parseInt( ( $('#tensid_hd_player_alternate01_nested').width() ) / 1.777778 );
						$('#tensid_hd_player_nested').height(flash_video_new_height);
						$('#tensid_hd_player_alternate01_nested').height(qt_video_new_height);
					} else {
						var flash_video_new_height = parseInt( ( $('#tensid_hd_player').width() ) / 1.777778 );
						var qt_video_new_height = parseInt( ( $('#tensid_hd_player_alternate01').width() ) / 1.777778 );
						$('#tensid_hd_player').height(flash_video_new_height);
						$('#tensid_hd_player_alternate01').height(qt_video_new_height);
					}
				}
				var resizeTimer = null;
				$(window).bind("resize", function(){
					if (resizeTimer) clearTimeout(resizeTimer);
					resizeTimer = setTimeout(setVideoHeight, 100);
				});
				
				if(!$.browser.msie) {
					$(window).load(setVideoHeight);
				} else {
					setVideoHeight();
					$('.lang_menu .right ul').css("position","absolute");
					$('.lang_menu .right ul').css("bottom","0");
					$('.lang_menu .right ul').css("right","0");
				}

			    //Panels
				outerLayout = $('body').layout({
						minSize:				100	// ALL panes
					,	west__size:				340
					,	west__minSize:			340
					,	west__onresize:			'westLayout.resizeAll'
					,	onresize_end:	function(){
							if (resizeTimer) clearTimeout(resizeTimer);
							resizeTimer = setTimeout(setVideoHeight, 100);
						}
				});
		
				westLayout = $('div.ui-layout-west').layout({
						minSize:				50	// ALL panes
					,	north__paneSelector:	".west-north"
					,	north__size:			130
					,	north__resizable: 		false
					,	north__slidable: 		false
					,	north__spacing_open:	0
					,	center__paneSelector:	".west-center"
					,	south__paneSelector:	".west-south"
					,	south__size:			50
					,	south__resizable: 		false
					,	south__slidable: 		false
					,	south__spacing_open:	0
				});
				
				//tree
				$('#tree').treeview({
					collapsed: true,
					animated: "medium",
					control: "#sidetreecontrol",
					persist: "location"
				});
				$('#tree > li.last').prepend('<div class="hitarea last"></div>');
				$('#tree > li.expandable, #tree > li.collapsable').prepend('<div class="hitarea connect"></div>');
				$('#tree > li').not('[class]').prepend('<div class="hitarea connect"></div><div class="hitarea connect_complete"></div>');
			})

