Cufon.set('fontFamily', 'Fago');
/* Cufon.replace('body'); */


Cufon('#mainNavi a', {hover: {color: '#ffffff'}});
Cufon('.home-block a', {hover: {span: true}});
Cufon('#subnaviFirstLevel a, #subnaviSecondLevel a.nopic, #subnaviThirdLevel a', {hover: {color: '#ffffff'}});
Cufon('#wasWirKoennenCenter h1, #wasWirTunCenter h1, #wasWirKoennenCenter h2, .thumbs-tooltip .subline, .preview-tooltip .descr');
//Cufon('#wasWirKoennenCenter h1, #wasWirTunCenter h1, #wasWirKoennenCenter h2, .ce_text p, #employeeProfile h2, #employeeProfile p, .subnavi-second-level-tooltip, .tooltip-bottom, .tooltip-small, .tooltip-footer-contact, #casesCharts .text');

//Cufon('#zeichenmangel .mod_twitterreader li .tweet ', {hover: {color: '#252525'}});

Cufon.set('fontFamily', 'FagoItalic');
Cufon(' #wasWirKoennenCenter p');
//Cufon('#zeichenmangel .mod_twitterreader .date', {hover: {color: '#252525'}});


Cufon.set('fontFamily', 'FagoBold');
Cufon('.mod_article h1:not(#wasWirKoennenCenter h1, #wasWirTunCenter h1),.article-p87 h2,  h3 strong,  .thumbs-tooltip .headline, .preview-tooltip strong');
//Cufon('strong, .mod_article h1:not(#wasWirKoennenCenter h1, #wasWirTunCenter h1)');


/* jQuery Carousel 0.9.8
Copyright 2010 Thomas Lanciaux and Pierre Bertet.
This software is licensed under the CC-GNU LGPL <http://creativecommons.org/licenses/LGPL/2.1/>
*/
(function(g){g.fn.carousel=function(q){var q=g.extend({direction:"horizontal",loop:false,dispItems:1,pagination:false,paginationPosition:"inside",nextBtn:'<input type="button" value="Next" />',prevBtn:'<input type="button" value="Previous" />',btnsPosition:"inside",nextBtnInsert:"insertAfter",prevBtnInsert:"insertBefore",nextBtnInsertFn:false,prevBtnInsertFn:false,autoSlide:false,autoSlideInterval:3000,delayAutoSlide:false,combinedClasses:false,effect:"slide",slideEasing:"swing",animSpeed:300,equalWidths:"true",verticalMargin:0,callback:function(){},useAddress:false,adressIdentifier:"carousel",tabLabel:function(r){return r},showEmptyItems:true,ajaxMode:false,ajaxUrl:"",stopSlideBtn:false,stopSlideTextPause:"Pause",stopSlideTextPlay:"Play"},q);if(q.btnsPosition=="outside"){q.prevBtnInsert="insertBefore";q.nextBtnInsert="insertAfter"}q.delayAutoSlide=0+q.delayAutoSlide;return this.each(function(){var r={$elts:{},params:q,launchOnLoad:[]};r.$elts.carousel=g(this).addClass("js");r.$elts.content=g(this).children().css({position:"absolute",top:0});r.$elts.wrap=r.$elts.content.wrap('<div class="carousel-wrap"></div>').parent().css({overflow:"hidden",position:"relative"});r.steps={first:0,count:r.$elts.content.children().length};r.$elts.loader=g('<div class="loader"></div>').css({position:"absolute"});r.steps.last=r.steps.count-1;if(r.params.pagination){o(r)}if(g.isFunction(r.params.prevBtnInsertFn)){r.$elts.prevBtn=r.params.prevBtnInsertFn(r.$elts)}else{if(q.btnsPosition=="outside"){r.$elts.prevBtn=g(q.prevBtn)[q.prevBtnInsert](r.$elts.carousel)}else{r.$elts.prevBtn=g(q.prevBtn)[q.prevBtnInsert](r.$elts.wrap)}}if(g.isFunction(r.params.nextBtnInsertFn)){r.$elts.nextBtn=r.params.nextBtnInsertFn(r.$elts)}else{if(q.btnsPosition=="outside"){r.$elts.nextBtn=g(q.nextBtn)[q.nextBtnInsert](r.$elts.carousel)}else{r.$elts.nextBtn=g(q.nextBtn)[q.nextBtnInsert](r.$elts.wrap)}}r.$elts.nextBtn.addClass("carousel-control next carousel-next");r.$elts.prevBtn.addClass("carousel-control previous carousel-previous");r.lastItemsToLoad;d(r);r.$elts.carousel.attr("tabindex",0).add(r.$elts.carousel.children()).bind({focus:function(s){g(document).bind("keypress",function(t){switch(t.keyCode){case 39:r.$elts.nextBtn.click();break;case 37:r.$elts.prevBtn.click();break}switch(t.charCode){case 110:r.$elts.nextBtn.click();break;case 112:r.$elts.prevBtn.click();break}})},blur:function(){g(document).unbind("keypress")}});n(r);g(function(){c(r);g.each(r.launchOnLoad,function(s,t){t()});if(r.params.autoSlide){f(r)}if(q.stopSlideBtn==true){r.$elts.stopSlideBtn=g('<button type="button" class="slide-control play">'+q.stopSlideTextPause+"</button>");a(r)}})})};function c(s){var t=s.$elts.content.children();var r=0;t.each(function(){$item=g(this);$itemHeight=$item.outerHeight();if($itemHeight>r){r=$itemHeight}});if(s.params.verticalMargin>0){r=r+s.params.verticalMargin}t.height(r);var q=s.$elts.content.children(":first");s.itemWidth=q.outerWidth();if(s.params.direction=="vertical"){s.contentWidth=s.itemWidth}else{if(s.params.equalWidths){s.contentWidth=s.itemWidth*s.steps.count}else{s.contentWidth=(function(){var u=0;s.$elts.content.children().each(function(){u+=g(this).outerWidth()});return u})()}}s.$elts.content.width(s.contentWidth);s.itemHeight=r;if(s.params.direction=="vertical"){s.$elts.content.css({height:s.itemHeight*s.steps.count+"px"});s.$elts.content.parent().css({height:s.itemHeight*s.params.dispItems+"px"})}else{s.$elts.content.parent().css({height:s.itemHeight+"px"})}i(s)}function d(q){q.$elts.nextBtn.add(q.$elts.prevBtn).bind("enable",function(){var r=g(this).unbind("click").bind("click",function(){if(q.params.ajaxMode&&r.is(".next")&&b(q)==(p(q)-1)&&!q.lastItemsToLoad){h(q);q.$elts.content.ajaxSuccess(function(){})}else{e(q,j(q,(r.is(".next")?"next":"prev")));if(q.params.stopSlideBtn==true){q.$elts.stopSlideBtn.trigger("pause")}else{m(q)}}}).removeClass("disabled").removeAttr("disabled");if(q.params.combinedClasses){r.removeClass("next-disabled previous-disabled").removeAttr("disabled")}}).bind("disable",function(){var r=g(this).unbind("click").addClass("disabled").attr("disabled","disabled");if(q.params.combinedClasses){if(r.is(".next")){r.addClass("next-disabled")}else{if(r.is(".previous")){r.addClass("previous-disabled")}}}}).hover(function(){g(this).toggleClass("hover")})}function o(q){q.$elts.pagination=g('<div class="center-wrap"><div class="carousel-pagination"><p></p></div></div>')[((q.params.paginationPosition=="outside")?"insertAfter":"appendTo")](q.$elts.carousel).find("p");q.$elts.paginationBtns=g([]);q.$elts.content.find("li").each(function(r){if(r%q.params.dispItems==0){k(q,r)}})}function k(r,q){if(r.params.pagination){r.$elts.paginationBtns=r.$elts.paginationBtns.add(g('<a role="button"><span>'+r.params.tabLabel(r.$elts.paginationBtns.length+1)+"</span></a>").data("firstStep",q)).appendTo(r.$elts.pagination);r.$elts.paginationBtns.slice(0,1).addClass("active");r.$elts.paginationBtns.click(function(s){e(r,g(this).data("firstStep"));if(r.params.stopSlideBtn==true){r.$elts.stopSlideBtn.trigger("pause")}else{m(r)}})}}function n(q){if(q.params.useAddress&&g.isFunction(g.fn.address)){g.address.init(function(s){var r=g.address.pathNames();if(r[0]===q.params.adressIdentifier&&!!r[1]){e(q,r[1]-1)}else{g.address.value("/"+q.params.adressIdentifier+"/1")}}).change(function(s){var r=g.address.pathNames();if(r[0]===q.params.adressIdentifier&&!!r[1]){e(q,r[1]-1)}})}else{q.params.useAddress=false}}function e(q,r){q.params.callback(r);l(q,r);q.steps.first=r;i(q);if(q.params.useAddress){g.address.value("/"+q.params.adressIdentifier+"/"+(r+1))}}function j(r,q){if(q=="prev"){if(!r.params.showEmptyItems){if(r.steps.first==0){return((r.params.loop)?(r.steps.count-r.params.dispItems):false)}else{return Math.max(0,r.steps.first-r.params.dispItems)}}else{if((r.steps.first-r.params.dispItems)>=0){return r.steps.first-r.params.dispItems}else{return((r.params.loop)?(r.steps.count-r.params.dispItems):false)}}}else{if(q=="next"){if((r.steps.first+r.params.dispItems)<r.steps.count){if(!r.params.showEmptyItems){return Math.min(r.steps.first+r.params.dispItems,r.steps.count-r.params.dispItems)}else{return r.steps.first+r.params.dispItems}}else{return((r.params.loop)?0:false)}}}}function l(q,r){switch(q.params.effect){case"no":if(q.params.direction=="vertical"){q.$elts.content.css("top",-(q.itemHeight*r)+"px")}else{q.$elts.content.css("left",-(q.itemWidth*r)+"px")}break;case"fade":if(q.params.direction=="vertical"){q.$elts.content.hide().css("top",-(q.itemHeight*r)+"px").fadeIn(q.params.animSpeed)}else{q.$elts.content.hide().css("left",-(q.itemWidth*r)+"px").fadeIn(q.params.animSpeed)}break;default:if(q.params.direction=="vertical"){q.$elts.content.stop().animate({top:-(q.itemHeight*r)+"px"},q.params.animSpeed,q.params.slideEasing)}else{q.$elts.content.stop().animate({left:-(q.itemWidth*r)+"px"},q.params.animSpeed,q.params.slideEasing)}break}}function i(q){if(j(q,"prev")!==false){q.$elts.prevBtn.trigger("enable")}else{q.$elts.prevBtn.trigger("disable")}if(j(q,"next")!==false){q.$elts.nextBtn.trigger("enable")}else{q.$elts.nextBtn.trigger("disable")}if(q.params.pagination){q.$elts.paginationBtns.removeClass("active").filter(function(){return(g(this).data("firstStep")==q.steps.first)}).addClass("active")}}function f(q){q.delayAutoSlide=window.setTimeout(function(){q.autoSlideInterval=window.setInterval(function(){e(q,j(q,"next"))},q.params.autoSlideInterval)},q.params.delayAutoSlide)}function m(q){window.clearTimeout(q.delayAutoSlide);window.clearInterval(q.autoSlideInterval);q.params.delayAutoSlide=0}function a(r){var q=r.$elts.stopSlideBtn;q.bind({play:function(){f(r);q.removeClass("pause").addClass("play").html(r.params.stopSlideTextPause)},pause:function(){m(r);q.removeClass("play").addClass("pause").html(r.params.stopSlideTextPlay)}});q.click(function(s){if(q.is(".play")){q.trigger("pause")}else{if(q.is(".pause")){q.trigger("play")}}});q.prependTo(r.$elts.wrap)}function p(q){return q.$elts.pagination.children().length}function b(q){return q.steps.first/q.params.dispItems}function h(q){q.$elts.carousel.prepend(q.$elts.loader);g.ajax({url:q.params.ajaxUrl,dataType:"json",success:function(r){q.lastItemsToLoad=r.bLastItemsToLoad;g(q.$elts.content).append(r.shtml);q.steps={first:q.steps.first+q.params.dispItems,count:q.$elts.content.children().length};q.steps.last=q.steps.count-1;c(q);k(q,q.steps.first);e(q,q.steps.first);if(q.params.stopSlideBtn==true){q.$elts.stopSlideBtn.trigger("pause")}else{m(q)}q.$elts.loader.remove()}})}})(jQuery);

function Lightbox(imgs, speed, offset) {
	var self = this;
	this.speed = speed || 500;
	this.offset = offset || 20;
	this.offset_before = 0;
	this.current = 0;
	this.images = imgs;
	this.cache = new Image();
	this.pattern = '<div id="lightbox-viewport">&nbsp;</div><div id="lightbox-container" class="wrapper"><div id="lightbox-background-container">&nbsp;</div><div id="lightbox-image-container"><img id="lightbox-image" src="" alt="#" /><div id="image-caption"></div></div><div id="lightbox-controls"><a href="#" id="lightbox-close">schlie&szlig;en</a><a href="#" id="lightbox-prev">zur&uuml;ck</a><a href="#" id="lightbox-next">vor</a></div></div>';

	this.prepare = function() {
		$('body').prepend(self.pattern);

		self.el_viewport = $('#lightbox-viewport').hide();
		self.el_container = $('#lightbox-container').hide();
		self.el_background_container = this.el_container.find('#lightbox-background-container').addClass('lightbox-load');
		self.el_image_container = this.el_container.find('#lightbox-image-container');
		self.el_caption = self.el_image_container.find('#image-caption').hide();
		self.el_image = self.el_image_container.find('#lightbox-image').hide();
		self.el_controls = self.el_container.find('#lightbox-controls');
		self.el_close = self.el_controls.find('#lightbox-close');
		self.el_prev = self.el_controls.find('#lightbox-prev').hide();
		self.el_next = self.el_controls.find('#lightbox-next').hide();
	}

	this.open = function(clbk) {
		self.offset_before = $(document).scrollTop();
		self.el_viewport.show().css({
			'height': $('html, body').height(),
			'width': $('html, body').width()
		});
		if (self.offset_before == self.offset)
			self.el_container.fadeIn(self.speed, clbk);
		else $('html, body').animate({
			'scrollTop': self.offset
		}, self.speed, function() {
			self.el_container.fadeIn(self.speed, clbk);
		});
	}
	this.close = function(clbk) {
		self.el_viewport.hide();
		if (self.offset_before == self.offset)
			self.el_container.fadeOut(self.speed, clbk);
		else self.el_container.fadeOut(self.speed, function() {
			$('html, body').animate({
				'scrollTop': self.offset_before
			}, self.speed, clbk);
		});
	}
	this.hide = function(clbk) {
		self.el_background_container.addClass('lightbox-load');
		self.el_image.animate({ 'opacity': 0 }, self.speed);
		self.el_caption.animate({ 'opacity': 0 }, self.speed, clbk);
	}
	this.show = function(clbk) {
		var h = self.images.eq(self.current).attr('rev') == 'youtube'
				? 500 + self.el_caption.height()
				: self.el_image_container.height();
		if (self.el_container.is(':visible'))
			self.el_container.animate({
				'height': ((h + 100) < 800 ? 800 : h + 100) + 'px'
			}, self.speed, function() {
				self.el_image.animate({ 'opacity': 1 }, self.speed, function() {
					self.el_background_container.removeClass('lightbox-load');
					self.el_caption.animate({ 'opacity': 1 }, self.speed, clbk);
				});
			});
		else self.open(function() {
			self.show(clbk);
		});
	}
	this.update = function() {
		var t = self.images.eq(self.current).data('title') || self.images.eq(self.current).attr('title');
		var c = self.images.eq(self.current);
		if (c.attr('rev') == 'youtube')
			swfobject.embedSWF(c.attr('href'), 'lightbox-image', '640', '500', '8', null, null, {
				allowScriptAccess: 'always',
				allowFullScreen: true
			}, { 'id': 'lightbox-image' }, function() {
				self.el_caption.css('opacity', 0).show().html(t);		
				self.show();
			});
		if (c.attr('rev') && c.attr('rev') != 'youtube'){
					
			swfobject.embedSWF("../swf/flowplayer-3.2.4.swf", 'lightbox-image', '640', '500', '8', null, {config: "{'clip': '"  + c.attr('rev') + "'}"}, {
				allowScriptAccess: 'always',
				allowFullScreen: true
			}, { 'id': 'lightbox-image' }, function() {
				self.el_caption.css('opacity', 0).show().html(t);		
				self.show();
			});
		
		}
		if(!c.attr('rev')) {
			$('#lightbox-image').replaceWith('<img id="lightbox-image" src="" alt="" />');
			self.el_image = $('#lightbox-image').css('opacity', 0).show().attr({ 'src': self.cache.src });
			self.el_caption.css('opacity', 0).show().html(t);		
			self.show();
			
			
			
			
		}
	}
	this.load = function(clbk) {
		var c = self.images.eq(self.current);
		if (c.attr('rev') == 'youtube')
			clbk();
		else {
			self.cache = new Image();
			self.cache.onload = clbk;
			self.cache.src = c.attr('href');
		}
	}

	this.prepare();
	this.el_close.click(function(ev) {
		ev.preventDefault();
		self.close();
	});
	this.el_viewport.click(function(ev) {
		ev.preventDefault();
		self.close();
	});
	this.images.click(function(ev) {
		ev.preventDefault();
		self.current = self.images.index($(this));
		self.load(self.update);
	});
	if (this.images.size() > 1) {
		this.el_prev.show().click(function(ev) {
			ev.preventDefault();
			self.current = self.images.eq(self.current - 1).size() ? self.current - 1 : self.images.size() - 1;
			self.hide(function() {
				self.load(self.update);
			});
		});
		this.el_next.show().click(function(ev) {
			ev.preventDefault();
			self.current = self.images.eq(self.current + 1).size() ? self.current + 1 : 0;
			self.hide(function() {
				self.load(self.update);
			});
		});
	}
}


(function ($) {

    $.fn.tooltip = function (opts) {
        $(this).each(function (index, el) {
            var self = this;
            this.element = $(el);
            this.options = jQuery.extend({
                'pattern': '',
                'speed': 500,
                'delay': 500,
                'offsetX': function (obj) {
                    return obj.tooltip.width();
                },
                'offsetY': function (obj) {
                    return obj.tooltip.height();
                }
            }, opts || {});
            this.tooltip = $(this.options.pattern.replace(/\%s/g, this.element.attr('title'))).appendTo($('body'));
            this.element.data('title', this.element.attr('title'));
            this.element.removeAttr('title');
            this.element.mouseenter(function (ev) {
                ev.preventDefault();
                self.tooltip.delay(self.options.delay).fadeIn(self.options.speed);
                $('body').mousemove(function (ev) {
                    self.tooltip.css({
                        'left': ev.pageX - self.options.offsetX(self),
                        'top': ev.pageY - self.options.offsetY(self)
                    });
                });
            });
            this.element.mouseleave(function (ev) {
                ev.preventDefault();
                if (self.tooltip.is(':visible') || self.tooltip.is(':animated')) self.tooltip.stop(true, true).fadeOut(self.options.speed);
                else self.tooltip.stop(true, true);
                $('body').unbind('mousemove');
            });
            var destrFns = this.element.data('destroy') ? this.element.data('destroy') : [];
            if (destrFns[destrFns.length] = function () {
                self.tooltip.fadeOut(self.options.speed);
            }) this.element.data('destroy', destrFns);
        });
        return this;
    }
    $.fn.inputDefault = function () {
        $(this).each(function (index, el) {
            var self = this;
            this.element = $(el);
            this.element.data({
                'default': this.element.val()
            });
            this.element.focus(function () {
                if ($(this).val() == $(this).data('default')) $(this).val('');
            });
            this.element.blur(function () {
                if (/^\s*$/.test($(this).val() || ' ')) $(this).val($(this).data('default'));
            });
        });
        return this;
    }


    $.fn.destroy = function () {
        $(this).each(function (index, el) {
            if ($(el).data('destroy')) for (i = 0; i < $(el).data('destroy').length; ++i) $(el).data('destroy')[i]();
        });
        return this;
    }


})(jQuery);


/*
//Pop-under window- By JavaScript Kit
//Credit notice must stay intact for use
//Visit http://javascriptkit.com for this script

//specify page to pop-under
var popunder="player.html"

//specify popunder window features
//set 1 to enable a particular feature, 0 to disable
var winfeatures="width=100,height=100,scrollbars=0,resizable=0,toolbar=0,location=0,menubar=0,status=0,directories=0"

//Pop-under only once per browser session? (0=no, 1=yes)
//Specifying 0 will cause popunder to load every time page is loaded
var once_per_session=1

///No editing beyond here required/////

function get_cookie(Name) {
  var search = Name + "="
  var returnvalue = "";
  if (document.cookie.length > 0) {
    offset = document.cookie.indexOf(search)
    if (offset != -1) { // if cookie exists
      offset += search.length
      // set index of beginning of value
      end = document.cookie.indexOf(";", offset);
      // set index of end of cookie value
      if (end == -1)
         end = document.cookie.length;
      returnvalue=unescape(document.cookie.substring(offset, end))
      }
   }
  return returnvalue;
}

function loadornot(){
if (get_cookie('popunder')==''){
loadpopunder()
document.cookie="popunder=yes"
}
}

function loadpopunder(){
win2=window.open(popunder,"",winfeatures)
win2.blur()
window.focus()
}

if (once_per_session==0)
loadpopunder()
else
loadornot()

*/


$(document).ready(function () {

	$('#subnaviSecondLevel a:not(.nopic, .p6)').tooltip({
		'pattern': '<div class="subnavi-second-level-tooltip"><span>%s</span><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 20; },
		'offsetY': function(obj) { return obj.tooltip.height() - 70; }
	});
	$('.thumbnails a').tooltip({
		'pattern': '<div class="thumbs-tooltip-container"><div class="thumbs-tooltip"><span>%s</span></div><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 20; },
		'offsetY': function(obj) { return obj.tooltip.height() - 90; }
	});



	$('#subnaviSecondLevel a.p6').tooltip({
		'pattern': '<div class="tooltip-small"><span>%s</span><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 20; },
		'offsetY': function(obj) { return obj.tooltip.height() - 20; }
	});
/*
	$('.thumbnails a, #support a').tooltip({
		'pattern': '<div class="tooltip-bottom"><span>%s</span><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 23; },
		'offsetY': function(obj) { return obj.tooltip.height() + 45; }
	});
*/
	$(' #leumundContainer img').tooltip({
		'pattern': '<div class="tooltip-bottom tooltip-bottom-leumund"><span>%s</span><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 23; },
		'offsetY': function(obj) { return obj.tooltip.height() + 64; }
	});
	$('#footerServiceNavi a:not(#m27)').tooltip({
		'pattern': '<div class="tooltip-footer-contact"><span>%s</span><div class="tooltip-right">&nbsp;</div></div>',
		'speed': 100,
		'delay': 300,
		'offsetX': function(obj) { return 23; },
		'offsetY': function(obj) { return obj.tooltip.height() + 55; }
	});
	
	$('.s19').mouseenter(function(){$('#wasWirTunLogowall .p19').addClass('active');});
	$('.s20').mouseenter(function(){$('#wasWirTunLogowall .p20').addClass('active');});
	$('.s21').mouseenter(function(){$('#wasWirTunLogowall .p21').addClass('active');});
	$('.s22').mouseenter(function(){$('#wasWirTunLogowall .p22').addClass('active');});
	$('.s23').mouseenter(function(){$('#wasWirTunLogowall .p23').addClass('active');});
	$('.s24').mouseenter(function(){$('#wasWirTunLogowall .p24').addClass('active');});
	$('.s25').mouseenter(function(){$('#wasWirTunLogowall .p25').addClass('active');});

	$('.s8').mouseenter(function(){$('#wasWirTunLogowall .p8').addClass('active');});
	$('.s9').mouseenter(function(){$('#wasWirTunLogowall .p9').addClass('active');});
	$('.s10').mouseenter(function(){$('#wasWirTunLogowall .p10').addClass('active');});
	$('.s11').mouseenter(function(){$('#wasWirTunLogowall .p11').addClass('active');});
	$('.s12').mouseenter(function(){$('#wasWirTunLogowall .p12').addClass('active');});
	$('.s13').mouseenter(function(){$('#wasWirTunLogowall .p13').addClass('active');});
	$('.s14').mouseenter(function(){$('#wasWirTunLogowall .p14').addClass('active');});
	$('.s15').mouseenter(function(){$('#wasWirTunLogowall .p15').addClass('active');});
	$('.s16').mouseenter(function(){$('#wasWirTunLogowall .p16').addClass('active');});
	$('.s17').mouseenter(function(){$('#wasWirTunLogowall .p17').addClass('active');});
	$('.s18').mouseenter(function(){$('#wasWirTunLogowall .p18').addClass('active');});
	$('.s66').mouseenter(function(){$('#wasWirTunLogowall .p66').addClass('active');});
	$('.s67').mouseenter(function(){$('#wasWirTunLogowall .p67').addClass('active');});
	$('.s68').mouseenter(function(){$('#wasWirTunLogowall .p68').addClass('active');});
	
	$('#subnaviFirstLevel a').mouseleave(function(){$('#wasWirTunLogowall a').removeClass('active');});

	$('.cases-preview-1').click(function(){$('#caseOverlay1').show(500);});
	$('.cases-preview-2').click(function(){$('#caseOverlay2').show(500);});
	$('.cases-preview-3').click(function(){$('#caseOverlay3').show(500);});
	$('.cases-preview-4').click(function(){$('#caseOverlay4').show(500);});

	$('.case-overlay .close-button, .case-overlay img').click(function(){$('.case-overlay').hide(300);});

	
	$('#lm28').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -247px'});});
	$('#lm29').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -494px'});});
	$('#lm30').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -741px'});});
	$('#lm31').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -988px'});});
	$('#lm32').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -1235px'});});
	$('#lm81').mouseenter(function(){$('#locationMap').css({backgroundPosition: '0 -1482px'});});
	$('#locationMap a').mouseleave(function(){$('#locationMap').css({backgroundPosition: '0 0'});});


	$("#subnaviThirdLevel").tabs("#casesCharts > div");
	$(".thumbnails").tabs(".showcase > .item");

	$("#subnaviThirdLevel a").click(function() {
		Cufon.set('fontFamily', 'Fago');
		Cufon.replace('#subnaviThirdLevel a:not(.current)',
		{
			color: '#303030',
			hover: '#ffffff'
		}
		
		);

	});


	var imgs = $('a[rel=lightbox], .gallery .gallery-image a');
	if (imgs.size())
		new Lightbox(imgs, 400, -20);
		
	if($("#wasWirTunLogowall a").size() && !jQuery.support.leadingWhitespace)
	{
		$("#wasWirTunLogowall a").each(function(index, el){
			$(el).children('span.wall-thumb-container img.wall-thumb').click(function(){window.location.href = $(el).attr('href');});
			$(el).children('span.wall-thumb-container').click(function(){window.location.href = $(el).attr('href');});
		});
	}
	
	$('.article-p87 .ce_text:not(.article-p87 .ce_text:first)').hide(0);
		$('#jobsNavigation').append('<div id="subnaviFirstLevel" />');
		
		$('.article-p87 .ce_text:not(.article-p87 .ce_text:first)').each(function(index, el){
			$(this).attr('id', 'job' + index);
			$('#subnaviFirstLevel').append('<a href="#" rel="job' + index + '">' + $(el).find('h2:first').text().replace('\(', '<br />(') + '</a>');
		});
	
		$('#jobsNavigation a').click(function(){
			$('#jobsNavigation a').removeClass('active');
			$(this).addClass('active');
			$('.article-p87 .ce_text').hide();
			$('#' + $(this).attr('rel')).show();
		
		});

	$("#jobsNavigation a").click(function() {
		Cufon.set('fontFamily', 'Fago');
		Cufon.replace('#jobsNavigation a:not(.active)',
		{
			color: '#75695A',
			hover: '#ffffff'
		}
		
		);

	});
	$('#f2 input.text, #f2 textarea, #f3 input.text, #f3 textarea').inputDefault();
	
	if($('#subnaviSecondLevel').find('a').size() > 9) {
		$('#subnaviSecondLevel').find('a').wrapInner('<div class="inner-wrap" />');
	
		$('#subnaviSecondLevel').carousel({
			dispItems: 8,
			direction: "vertical",
			loop: true
		});
	}
	

	
	
});



