$(document).ready(function(){
	$(".news-latest-container div.news-latest-item:odd").css("background-color","#e9e9ea");
	
	$("input.search_bar_searchbox").focus(function(){
		if($(this).val() == 'Suche' || $(this).val() == 'Search'){
			$(this).val('');
		}
	}).blur(function(){
		if($(this).val() == '' && $('#search_bar_lang').val() == '-1' ){
			$(this).val('Suche');
		}else if($(this).val() == '' && $('#search_bar_lang').val() == '1' ){
			$(this).val('Search');
		}
	});
	
	$('#first_partner').cycle({
		fx: 'fade' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
	});
	
	$('#second_partner').cycle({
		fx: 'fade'
	});
	
	$('#third_partner').cycle({
		fx: 'fade' 
	});
	
	//Set default open/close settings
    $('.mygallery_content').hide(); //Hide/close all containers
    $('.carrier_container').hide(); //Hide/close all containers
    //$('.acc_trigger:first').addClass('active').next().show(); //Add "active" class to first trigger, then show/open the immediate next container

    //On Click
    $('.imggallery_title').click(function(){
      if( $(this).next().is(':hidden') ) { //If immediate next container is closed...
        $('.imggallery_title').removeClass('imggallery_title_active').next().slideUp(); //Remove all "active" state and slide up the immediate next container
        $(this).toggleClass('imggallery_title_active').next().slideDown(); //Add "active" state to clicked trigger and slide down the immediate next container
      }else{
        $('.imggallery_title').removeClass('imggallery_title_active').next().slideUp();
      }
      
      return false; //Prevent the browser jump to the link anchor
    });
	
	$('.point_text_carrier').click(function(){
		
		$($(this).parent()).find('.carrier_container').slideToggle();
		$(this).toggleClass('point_text_carrier_active');
		
		//removed to enable links
		//$(this).find('.point_text_carrier').toggleClass('point_text_carrier_active');
		//$(this).find('.carrier_container').slideToggle();
      
      return false; //Prevent the browser jump to the link anchor
    });
	
	$('.btn_semico').click(function(){
		var link = $(this).find('a.title_btn').attr('href');
		window.location.href = link;
	});
})
