//<![CDATA[
jQuery.noConflict();
var isOpen = false;
var ImagePath = "./doc/images/";
// jQuery("#treeview").treeview();

var SERVERLIST = {};
SERVERLIST["Videos"] = {
		"Video of the day" : "javascript:ajax_loadContent('content','./index.php?q=slastcontent&amp;value1=21');",
		"Latest Videos" : "javascript:ajax_loadContent('content','./slist-21-1.html');"
	};
SERVERLIST["Downloads"] = {
		"All" : "javascript:ajax_loadContent('content','./slist-20-1.html');",
		"LCSearch" : "javascript:ajax_loadContent('content','./sread-20-1.html');",
		"LCJSearch" : "javascript:ajax_loadContent('content','./sread-20-1.html');"
	};
SERVERLIST["3rd Party Downloads"] = {
		"All" : "javascript:ajax_loadContent('content','./slist-23-1.html');"
	};
SERVERLIST["Plugins"] = {
	"Weather" : "javascript:ajax_loadContent('content','./?q=addnav_news&amp;value1=weather&amp;l=de_DE');",
	"Goolge Streetview Driver v.1.0" : "./read-22-503.html",
	"Source Convert.v.1.0" : "./read-22-5.html",
	"IP GeoLocation" : "./read-22-18.html"
};

function getRSSLinks() {
	document
			.writeln("[<a class=\"submenu\" onclick=\"cFCW('./?q=srss&amp;query=http://www.radiobonn.de/inc/rss/lokales.rss',410,700,10,200);return false\" href=\"#\">Radio Bonn/Rhein-Sieg RSS</a>]"
					+ "&nbsp;[<a class=\"submenu\" onclick=\"cFCW('./?q=srss&amp;query=http://www.spiegel.de/schlagzeilen/index.rss',410,2110,10,10);return false\" href=\"#\">Spiegel RSS</a>]"
					+ "&nbsp;[<a class=\"submenu\" onclick=\"cFCW('./?q=srss&amp;query=http://yigg.de/atom/beste-nachrichten',410,700,10,10);return false\" href=\"#\">Yigg RSS</a>][<a class=\"submenu\" onclick=\"cFCW('./?q=srss&amp;query=http://www.heise.de/newsticker/heise.rdf',410,1000,10,10);return false\" href=\"#\">Heise RSS</a>]"
					+ "&nbsp;[<a class=\"submenu\" onclick=\"cFCW('./?q=srss&amp;query=http://rss.golem.de/rss.php?feed=RSS2.0',410,1000,10,10);return false\" href=\"#\">Golem RSS</a>]");
}
function getMenu() {
//	/*
	jQuery("#treeview").treeview();
	var s = "<div id=\"leftmenucontent\">\n";	
	var t = getTreeView();
	s += "" + t + "";
	s += "</div>";
	jQuery("#lmenucontent").html("" + s);
//	*/
}
function getDebug(id, text) {
	// jQuery(id).html("");
	jQuery(id).html(jQuery(id).html() + text);
}
function getTreeView() {
	this.serverList = SERVERLIST;
	this.serverId = null;
	var s = "<ul class=\"filetree treeview\" id=\"jbrowser\">";
	for ( var serverId in this.serverList) {
		s += "<li class=\"closed\"><span class=\"folder\">" + serverId + "</span>";
		s += "<ul>";
		for ( var siteId in this.serverList[serverId]) {
			s += "<li><a href=\"" + serverList[serverId][siteId]
					+ "\"><span class=\"file\">" + siteId + "</span></a></li>";

		}
		s += "</ul></li>";
	}
	return "" + s+"</ul>";
}

function getGallery(id) {
	jQuery.noConflict();
	// alert(id);
	var s = "";
	for (i = 1; i < 24; i++) {
		s += "<a href=\"" + ImagePath + i
				+ ".jpg\" rel=\"lightbox\"><img src=\"" + ImagePath + i
				+ ".jpg\" width=\"100\" height=\"100\"></a>";
	}
	s += "<br />";
	for (i = 1; i < 24; i++) {
		s += "[<a href=\"" + ImagePath + i + ".jpg\" rel=\"lightbox\">" + i
				+ "</a>]";
	}
	//jQuery("#content").html("<p>Letztechance.Org</p>" + s);
}
function getContent(id) {
	var s = "";
	//jQuery("#content").html("<p>Letztechance.Org</p>" + s);
}



// Video of the Day
function getVideooftheDay() {
	document.writeln(" <div id=\"vaccordion\"> ");
	document
			.writeln(" 	<h3><a href=\"#\" class=\"ui-accordion-header ui-helper-default ui-state-hover ui-corner-all\">Video of the day</a></h3> ");
	document.writeln(" 	<div> ");
	document.writeln(" 		<p> ");
	document.writeln(" <div id=\"videooftheday\" style=\"height:480px;\"> ");
	document
			.writeln(" <script type=\"text/javascript\" src=\"./js/swfobject/swfobject.js\"></script> ");
	document
			.writeln(" <div id=\"video_clips\">Videos loading...</div><script type=\"text/javascript\">ajax_loadContent('video_clips','./index.php?q=slastcontent&amp;value1=21');</script>	</div> ");
	document.writeln("  ");
	document.writeln(" 		</p> ");
	document.writeln(" 	</div> ");
	document.writeln(" </div> ");
}

function toggleDiv(id) {
	if (isOpen == false) {
		Effect.Appear('registeruser');
		isOpen = true;
	} else {
		Effect.Fade('registeruser');
		isOpen = false;
	}
}

// $(document).ready(function(){
function JQueryAudioPlayer() {
	jQuery(document)
			.ready(
					function() {

						jQuery("#jquery_jplayer_1")
								.jPlayer(
										{
											ready : function() {
												jQuery(this)
														.jPlayer(
																"setMedia",
																{
																	mp3 : "http://www.jplayer.org/audio/mp3/TSP-01-Cro_magnon_man.mp3"
																});
											},
											swfPath : "./plugins/tools/lc2jplayer/js",
											supplied : "mp3",
											wmode : "window"
										});
					});
}
function JQueryVideoPlayer() {
	$(document)
			.ready(
					function() {

						$("#jquery_jplayer_1")
								.jPlayer(
										{
											ready : function() {
												$(this)
														.jPlayer(
																"setMedia",
																{
																	m4v : "http://www.jplayer.org/video/m4v/Big_Buck_Bunny_Trailer.m4v",
																	ogv : "http://www.jplayer.org/video/ogv/Big_Buck_Bunny_Trailer.ogv",
																	webmv : "http://www.jplayer.org/video/webm/Big_Buck_Bunny_Trailer.webm",
																	poster : "http://www.jplayer.org/video/poster/Big_Buck_Bunny_Trailer_480x270.png"
																});
											},
											swfPath : "js",
											supplied : "webmv, ogv, m4v",
											size : {
												width : "640px",
												height : "360px",
												cssClass : "jp-video-360p"
											}
										});

					});
}
// JQuery Accordeon
jQuery(function() {
	if (jQuery("#vaccordion").html() != null
			&& jQuery("#vaccordion").html().length != 0) {
		jQuery("#vaccordion").accordion({
			collapsible : true
		});
	}
});

jQuery(function() {
	if (jQuery("#accordion").html() != null
			&& jQuery("#accordion").html().length != 0) {
		jQuery("#accordion").accordion({
			collapsible : true
		});
	}
});

jQuery(document).ready(function() { // first example
	jQuery("#browser").treeview();
	jQuery("#jbrowser").treeview();
	// second
	/*
	jQuery("#navigation").treeview({
		persist : "location",
		collapsed : true,
		unique : true
	});
	// third
	jQuery("#red").treeview({
		animated : "fast",
		collapsed : true,
		unique : true,
		persist : "cookie",
		toggle : function() {
			window.console && console.log("%o was toggled", this);
		}
	});
	// fourth
	jQuery("#black, #gray").treeview({
		control : "#treecontrol",
		persist : "cookie",
		cookieId : "treeview-black"
	});
	*/
});
// EOF Menu
