/**
 * javascripts - include after body
 * @param {Object} "#dropdown li"
 */

 
 /**
  * special layout for links in feature boxes 
  * one link with the class button will be wrapped
  */
 function renderFeatureBoxLinks(boxClassName) {
 	var linkobj = jQuery("." + boxClassName + "");
	linkobj = linkobj.find("a.button");
	linkobj.wrapInner("<div><div></div></div>");	
 }



jQuery.noConflict();

var mycontentDiv = jQuery("#mycontent h2(2)")

function init() {
	
	jQuery(document).ready(function(){
		
		// extend jquery hoverClass 
		jQuery.fn.hoverClass = function(c) {
			return this.each(function(){
				jQuery(this).hover( 
					function() { jQuery(this).addClass(c);  },
					function() { jQuery(this).removeClass(c); }
				);
			});
		};	  
		
		
		jQuery("#dropdown li").hover(
			// function(){ $("ul", this).fadeIn("fast"); }, 
			function(){ jQuery("ul", this).show(); }, 
			function(){ jQuery('ul', this).css('display', 'none'); } 
		);
		
	  	if (document.all) {
	  		jQuery("#dropdown li").hoverClass("sfHover");
		}
		
		// define all boxes with button style links	
		renderFeatureBoxLinks("col1_special");
	 	renderFeatureBoxLinks("col1_box");
		renderFeatureBoxLinks("col2_box");
		
		// lightbox links 
		// textpic
		try {
			jQuery('.gallery a:not(a.download)').lightBox();
			jQuery('.csc-textpic-imagewrap a:not(a.download)').lightBox();
			// news
			jQuery('.news-single-item .csc-textpic-imagewrap a').lightBox();
		}
		catch (e) {}
		
		// sliderbox webcams right
		try {
			slider_cams();
			slider_weather();
		}
		catch (e) {}
		
		languageNav();
		
  });
  
	jQuery.fn.hoverClass = function(c) {
		return this.each(function(){
			jQuery(this).hover( 
				function() { jQuery(this).addClass(c);  },
				function() { jQuery(this).removeClass(c); }
			);
		});
	};	  	
}


function showSearchHelp(helpId) {
	 var helpDiv = jQuery('#' + helpId);
	 if (helpDiv.css('display') == 'none')
	 	helpDiv.slideDown("fast");
	else
		helpDiv.slideUp("fast");
}


jQuery(document).ready(function(){
	init();
});





 


