jQuery.fn.exists = function(){return jQuery(this).length>0;}

$(document).ready(function() {
    $('.menu_home_entry').hover(function() {
        $(this).children('.menu_home_sub').stop();
        $(this).children('.menu_home_sub').fadeTo(200, 1);
    }, function() {        
        $(this).children('.menu_home_sub').stop();
        $(this).children('.menu_home_sub').fadeTo(200, 0, function() {
            $(this).css('display', 'none');
        });
    });

 	if(!$(".news-single-item-left").exists()){
            if( $(".content_left").exists() && !$("#page_full").exists() ) {
		$('.content_left').jScrollPane({
			showArrows:true,
			animateTo: true,
			scrollbarWidth: 20,
			scrollbarMargin: 5,
			animateInterval: 50,
			animateStep: 7,
			wheelSpeed: 100
		});
            }
	} else {	
		$('.news-single-item-left').jScrollPane({
			showArrows:true,
			animateTo: true,
			scrollbarWidth: 20,
			scrollbarMargin: 5,			
			animateInterval: 50,
			animateStep: 7,
			wheelSpeed: 100
		});
	}
        
	// offene Stellen button
	$('.application_open_link').colorbox({iframe:true, width:"680", height:"95%"});
        $('.application_print').click(function() {
            var win = window.open($(this).attr('href'), 'Print', 'resizable=yes,status=no,menubar=no,scrollbars=yes,location=no,toolbar=no,width=700,height=500');
            return false;
        });
});
$(function(){
    $(".app_link").tipTip({delay:0});
});

