$(document).ready(function(){ 
			$("a.iframe").fancybox({
				'transitionIn'	:	'elastic',
				'transitionOut'	:	'elastic',
				'speedIn'		:	600, 
				'speedOut'		:	200, 
				'overlayShow'	:	true,
				'autoscale'		:	true,
				'scrolling'		:	'no',
				'margin'		:	0,
				'padding'		:	0,
				'width'			:	810,
				'height'		:	600
			});
			//search field 
			$('.text').each(function() {
				var text = this.value;
				$(this).css('color', '#666');
				$(this).focus(function() {
					if(this.value == text) {
						this.value = '';
						$(this).css('color', '#333');
					}
				});
				$(this).blur(function() {
					if(this.value == '') {
						$(this).css('color', '#666');
						this.value = text;
					}
				});
			});
			
			function addMega(){
				$(this).addClass("hovering");
			}
				
			function removeMega(){
				$(this).removeClass("hovering");
			}
				
			var megaConfig = {
				interval: 0,
				sensitivity: 1,
				over: addMega,
				timeout: 100,
				out: removeMega
			};
				
			$("#menu div").hoverIntent(megaConfig);
				
			$("#languagemenu").hover(function () {
				if ($("#slider").is(":hidden")) {
					$("#slider").slideDown("fast");
				} else {
					$("#slider").hide();
				}
				return false;
			});

			var t = '';
			$("#languagemenu").mouseout( function () { t = setTimeout('$("#slider").slideUp(1000);',1000); }); 
			$("#slider").mouseover( function () { clearTimeout(t); });
			$("#languagemenu").mouseover( function () { clearTimeout(t); });

			$('#slideshow').cycle({
				fx: 'fade',
				timeout: 4000
			});
			
			
			$("ul#ticker01").liScroll({
				travelocity: 0.03
			});
			
			$('#content_left ul ul').each(function() {
				if ($(this).parent('li').find('a[href="/#"]').length) {
					if (!$(this).find('a.on').length) $(this).hide();	
				}
			});
						
			$('#content_left a[href="/#"]').click(function() {
				if ($(this).parent().find('ul:hidden')) {
					$(this).parent().find('ul').slideDown();
				}
				return false;
			});
			
		}); 
