var baseAssetUrl = '../';
if(jQuery) (function($) {
$(document).ready(function() {
$('.layerWrapper').pi_Layer();
$('.tooltip').pi_Tooltip();
$('.toolbarWrapper').pi_Toolbar();
$('.toolbarWrapper').pi_Toolbar();
//$(".toolbarBeraterTiles").jScrollPane({autoReinitialise:true});
$('.toolbarSchadenTab li').click( function(e) {
var mycontext = $(e.currentTarget).parent().parent();
$('.toolbarSchadenTab li',mycontext).removeClass('selected');
$(e.currentTarget).addClass('selected');
var index = $(e.currentTarget).index();
$('.toolbarSchadenTabContent',mycontext).each (function(i,v) {
if (i==index) {
$(v).show();
} else {
$(v).hide();
}
});
e.preventDefault();
return false;
});
//globaler Aufruf für alle Container mit der Klasse hideMode
$('.standardContainer.hideMode').gsy_Container();
//globaler Aufruf für alle Container mit der Klasse accordionModul
$('.accordionModul').pi_AccordionModul();
//globaler Aufruf für alle Tabcontainer mit der Klasse tabContainer
$('.tabModule').pi_TabModul({ active:1 });
$('.rechnerGroupContainer').pi_RechnerGroupContainer( );
$('.jw-video').each(function(){
jwplayer($(this).attr("id")).setup({
file: $(this).attr("src"),
image: $(this).attr("poster"),
stretching: "uniform",
skin: '/media/js/jwplayer/src/skin.xml',
width: $(this).attr("width"),
height: $(this).attr("height"),
'controlbar': 'bottom',
html5player:'/media/js/jwplayer/src/jwplayer.html5.js',
flashplayer:'/media/js/jwplayer/src/jwplayer.flash.swf'
});
});
var $overlay = $('
').hide().appendTo('body');
var layerOptions = {
show: {
effect: 'fadeIn',
duration: 100
},
hide: {
effect: 'fadeOut',
duration: 100
},
closeText: '',
modal: true,
resizable: false,
draggable: false,
autoOpen: false,
width: 'auto'
};
$('.media.image').each(function() {
$.data(this, 'dialog',
$(this).parents('div.content').find('.layerWrapper').dialog(layerOptions)
);
}).click(function() {
$.data(this, 'dialog').dialog('open');
return false;
});
var videoOptions = {
show: {
effect: 'fadeIn',
duration: 100
},
hide: {
effect: 'fadeOut',
duration: 100
},
closeText: '',
modal: true,
resizable: false,
draggable: false,
autoOpen: false,
width: 'auto'
};
$('.media.video').each(function() {
$.data(this, 'dialog',
$(this).parents('div.content').find('.layerWrapper').dialog(videoOptions)
);
}).click(function() {
$.data(this, 'dialog').dialog('open');
return false;
});
$('a.media.image.cms_ov').click(function() {
$('.layerWrapper').pi_Layer('setHeadline',$('img',this).attr("alt"));
$('.layerWrapper').pi_Layer('setContent','');
$('.layerWrapper').pi_Layer('show');
});
$('.rechnerFeatureText').pi_RechnerFeatureText();
$('.footerSocial .recommend .btnSwitch').click(function(e){
var t = e.currentTarget;
if (!$(t).hasClass('selected')) {
$(t).addClass('selected');
} else {
$(t).removeClass('selected');
}
e.preventDefault();
return false;
});
$('.topLevel.hasContent a.link').click(function(e) {
var li = $(this).parent();
var index = li.index();
var selected = li.hasClass('selected');
if (selected) {
$('.subLevelContainer').hide();
$(li).removeClass('selected');
} else {
$('.topLevel').removeClass('selected');
$('.topLevel .subLevelContainer').hide();
$('.subLevelContainer', li).show();
$(li).addClass('selected');
}
$('html, body').animate({
scrollTop: $(document).height()-$(window).height()},
1000,
"easeOutQuint"
);
//e.preventDefault();
//return false;
});
$('a.beraterClick').bind('click',function(event){
event.preventDefault();
$('a.consultant').triggerHandler('click');
$(document).scrollTop(0);
$('#ort').focus();
if($('#berater_suchtext').val() != "" && $('#berater_suchtext').val() != null && $('#berater_suchtext').val() != undefined) {
$('#ort').val($('#berater_suchtext').val());
$( "#mapbutton" ).trigger( "click" );
}
return false;
});
$("#loginnav a.angemeldet").click(function(e) {
e.preventDefault();
$("ul#menu_angemeldet").toggle();
$("#loginnav a.angemeldet").toggleClass("menu-open");
});
$(".search").suggestSearch();
$('.standardContainer form .inputBase').pi_InputBase();
$.fn.extend({
hasClasses: function (selectors) {
var self = this;
for (i in selectors) {
if ($(self).hasClass(selectors[i]))
return true;
}
return false;
}
});
$('.sectionGroup').each(function(){
if (!$(this).hasClass('notEqualHeights')) {
if($(this).children().hasClasses(['width33', 'width50'])) {
if($(this).parent().css('display') === 'none') {
$(this).parent().css({visibility: 'hidden', display : 'block'}).children().find('.sectionContent').not('.table').not('.sad').equalHeights();
$(this).parent().css({visibility: 'visible', display: 'none'});
} else {
$(this).children().find('.sectionContent').equalHeights();
}
if(!$(this).children().find('.sectionBox').hasClass('textUeberBildModul')){
var self = this;
$(self).children().find('.primaryButton').addClass('equalHeight');
$(self).children().find('.primaryButton').addClass('equalHeight');
$(self).children().find('.secondaryButton').addClass('equalHeight');
$(self).children().find('.secondaryButton').addClass('equalHeight');
}
}
}
});
$.fn.extend({
hasClasses: function (selectors) {
var self = this;
for (i in selectors) {
if ($(self).hasClass(selectors[i]))
return true;
}
return false;
}
});
$('.sectionGroup').each(function(){
if (!$(this).hasClass('notEqualHeights')) {
if($(this).children().hasClasses(['width33', 'width50'])) {
if($(this).parent().css('display') === 'none') {
$(this).parent().css({visibility: 'hidden', display : 'block'}).children().find('.sectionContent').not('.table').not('.sad').equalHeights();
$(this).parent().css({visibility: 'visible', display: 'none'});
} else {
$(this).children().find('.sectionContent').equalHeights();
}
if(!$(this).children().find('.sectionBox').hasClass('textUeberBildModul')){
var self = this;
$(self).children().find('.primaryButton').addClass('equalHeight');
$(self).children().find('.secondaryButton').addClass('equalHeight');
$(self).children().find('.secondaryButton').addClass('equalHeight');
}
}
}
});
$('.kachelGroup').each(function(){
if($(this).parent().css('display') === 'none') {
$(this).parent().css({visibility: 'hidden', display : 'block'}).children().find('.kachelModulItemContent');
$(this).parent().css({visibility: 'visible', display: 'none'});
} else {
$(this).children().find('.kachelModulItemContent').equalHeights();
}
});
$('.formInputBase.formInputRadio').customRadioCheckbox();
$('.inputRadioWrap > .inputRadio').customRadioCheckbox();
$('.formInputBase.formInputDropDown select').selectBox();
$('.formInputBase.formInputText').customRadioCheckbox();
$('.karriereFilter .formInputBase.formInputDropDown').hide();
$('.formInputText').show();
if ($("#detail:checked").val() == "detail") {
// Falls Detailsuche ausgewählt ist...
$('.formInputDropDown').show();
$('.karriereFilter .selectBox-options-wrapper').jScrollPane();
$('.formInputText').hide();
}
// click auf volltext
// 1.3.1 stellenmarkt reihenfolge volltext und detail vertauscht
$('.formInputRadio .singleElement').eq(1).click(function(){
$('.karriereFilter .formInputBase.formInputDropDown').each(function(){
var mySelectText = $('select option:first', this).text();
$('.selectBox-label',this).text(mySelectText);
$('.selectBox-dropdown-menu').each(function(){
$('li', this).removeClass('selectBox-selected');
$('li', this).eq(0).addClass('selectBox-selected');
});
});
// reset select options...
$('#yw20 option:first').attr('selected', 'selected');
$('#yw21 option:first').attr('selected', 'selected');
$('#yw22 option:first').attr('selected', 'selected');
$('#yw23 option:first').attr('selected', 'selected');
$('#yw26 option:first').attr('selected', 'selected');
// end reset select options...
$('.formInputDropDown').hide();
$('.formInputText').show();
});
// click auf detail
$('.formInputRadio .singleElement').eq(0).click(function(){
$('.formInputDropDown').show();
$('.karriereFilter .selectBox-options-wrapper').jScrollPane();
$('.formInputText').hide();
});
// make Stellenanzeigen selectbox scrollable...
// 1.3.1 vergössern der boxen auf 280 px
if($('.karriereFilter .formInputDropDown').length > 0){
$('.karriereFilter .formInputDropDown').find('a.selectBox-dropdown').on('click', function(){
$(this).parent().find('.jspPane').css('width', '280px');
$(this).parent().find('.jspContainer').css('width', '280px');
$(this).parent().find('.selectBox-options-wrapper').css('width', '280px');
$(this).parent().find('.selectBox-options-wrapper').jScrollPane();
});
}
// end of selectboxes scrollable...
// Animation in Element "Bühne" laden
if($('.introModulProdukte[data-id="buehneAnim"]').length > 0){
var noAnim = $.cookie('animPlayed') || '';
$('.introModulProdukte[data-id="buehneAnim"]').each(function(){
if(noAnim.indexOf($(this).attr('pageId')+',') < 0){
$.cookie('animPlayed', noAnim + $(this).attr('pageId') + ',');
var animationTool = got.poof(
$(this).get(0),
{
anim: {
image: $(this).attr("data-image"),
duration: 3000,
type: 'pingpong',
from: {
top: 'auto',
left: '-200px',
right: 'auto',
bottom: 0
},
to: {
left: '50%',
bottom: 0
}
},
poof: {
image: '/media/img/gotanim/poof.png'
}
}
);
window.setTimeout(function () {
animationTool.show();
}, 2000);
}
});
}
// ende Animation
// Grafiken aus INPUT_DOM mit Auszeichnung "full_height" in eigene Section setzen
if($('section .full_height').length > 0){
$('section .full_height').each(function(){
if($(this).hasClass('right') || $(this).hasClass('left')){
var newfloat = ($(this).hasClass('right'))?'right':'left';
var invertedFloat = (newfloat == 'right')?'left':'right';
//var section = $(this).closest('section');
var section = $(this).parent();
var setHidden = false;
if(!$(this).is(':visible')){
$(this).closest('.tabContainer').css('display', 'block');
setHidden = true;
}
var newSectionWidth = $(this).outerWidth(true);
var outerSectionWidth = section.outerWidth(true) - parseInt(section.css('padding-left')) - parseInt(section.css('padding-right'));
var sectionWidth = (outerSectionWidth - newSectionWidth);
if($(this).parent().hasClass('gradientLightBlue')){
sectionWidth = sectionWidth - 4;
}
//console.log('outerSectionWidth true/false: ' + outerSectionWidth +' / ' + section.outerWidth());
//console.log('newSectionWidth: ' + newSectionWidth);
//console.log('sectionWidth: ' + sectionWidth);
if(setHidden){
$(this).closest('.tabContainer').css('display', 'none');
}
var imgWrapper = $('' + $(this).html() + '
');
$(this).remove();
var txtWrapper = $('' + section.html() + '
');
section.html('');
section.append(imgWrapper);
section.append(txtWrapper);
/*
var newSection = $('');
newSection.append('');
section.attr('style', 'width:' + sectionWidth + 'px; float:'+ invertedFloat +';');
section.before(newSection.html());
*/
}
});
}
// Ende "full_height" in eigene Section setzen
});
})(jQuery);