$.noConflict();
// Use jQuery via jQuery $ namespace
	jQuery(document).ready(function($) {
		setBodyHeight();

//Set Body Height
		
		
		function setBodyHeight() {
			var viewportwidth;
			var viewportheight;
			var docHeight = $("#mainbody").height();
			 
			 // the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
			 
			 if (typeof window.innerWidth != 'undefined')
			 {
				  viewportwidth = window.innerWidth,
				  viewportheight = window.innerHeight
			 }
			 
			// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
			
			 else if (typeof document.documentElement != 'undefined'
				 && typeof document.documentElement.clientWidth !=
				 'undefined' && document.documentElement.clientWidth != 0)
			 {
				   viewportwidth = document.documentElement.clientWidth,
				   viewportheight = document.documentElement.clientHeight
			 }
			 
			 // older versions of IE
			 
			 else
			 {
				   viewportwidth = document.getElementsByTagName('body')[0].clientWidth,
				   viewportheight = document.getElementsByTagName('body')[0].clientHeight
			 }
				
				
			if (viewportheight > docHeight) {
				
				//alert(docHeight);
				$('body').css('height', viewportheight);
				
			}
			
			
		}	
			
// Slideshow
		$('#Slideshow').cycle({
			fx: 'fade', // choose your transition type, ex: fade, scrollUp, shuffle, etc...
			timeout: '4500',
			speed: '1500'
		});
		
//Language Dropdown

		createDropDown();
		
		$(".dropdown dt a").click(function() {
			$(".dropdown dd ul").slideDown();
		});

		$(document).bind('click', function(e) {
			var $clicked = $(e.target);
			if (! $clicked.parents().hasClass("dropdown"))
				$(".dropdown dd ul").hide();
		});
					
		$(".dropdown dd ul li a").click(function() {
			var text = $(this).html();
			$(".dropdown dt a").html(text);
			$(".dropdown dd ul").hide();
			
			var source = $("#jumpMenu");
			source.val($(this).find("span.value").html())
		});
			
		function createDropDown(){
			var source = $("#jumpMenu"); 
			var selected = source.find("option:selected");
			var options = $("option", source);
	
			$("#LanguageSelect").append('<dl id="target" class="dropdown"></dl>')
			$("#target").append('<dt><a href="' + selected.val() + '" onclick="return false;"' + 'class="Flag' + selected.text() + '">' + selected.text() + 
				'<span class="value">' + selected.val() + '</span></a></dt>')
			$("#target").append('<dd><ul></ul></dd>')
	
			options.each(function(){
				$("#target dd ul").append('<li><a href="' + $(this).val() + '" class="Flag' + $(this).text() + '">' + 
					$(this).text() + '<span class="value">' + 
					$(this).val() + '</span></a></li>');
			});
		}	
	});
	
	
	
// All other lib's $ namespaces
	


	
	


