Gerontopsychiatrische Pflegefachkraft
Gerontopsychiatrische Pflegefachkraft
div');
var $tabs = $('.job-ad-tab-section');
$('ul li a', $tabs).click(function (e) {
e.preventDefault();
var id = $(this).attr('href');
$('ul li', $tabs).removeClass('tab-active');
$(this).closest('li').addClass('tab-active');
$tabContainers.removeClass('tab-active');
$tabContainers.css('height', '');
$('#jobad-tabs > div' + id).addClass('tab-active');
tabChanged();
});
});
/* iframe resizing */
var currentMode;
$(function () {
var tabHash = window.location.hash.substring(1);
if (tabHash) {
setTabActive(tabHash);
}
tabChanged();
$(window).resize(onResizeHandler);
$(window).on('orientationchange', onResizeHandler);
});
var setTabActive = function (hash) {
var $tabContainers = $('#jobad-tabs > div');
var $tabs = $('.job-ad-tab-section');
$('ul li', $tabs).removeClass('tab-active');
$tabContainers.removeClass('tab-active');
var activeTab = $('a[href="' + '#' + hash + '"]').closest('li');
activeTab.addClass('tab-active');
$('#' + hash).addClass('tab-active');
}
var initTabContentPrint = function () {
var tabcontent = $('div > .tab-active');
if ($('iframe:first', tabcontent).length > 0 && !($('ul > .tab-active > a').data('nextPage') == '#tab-additional-ads')) {
initPrint($('iframe', tabcontent));
} else {
if ($('ul > .tab-active > a').attr('href') == '#tab-additional-ads') {
initPrint($('iframe, #search-result-list', tabcontent));
}
else {
initPrint($('div', tabcontent));
}
}
};
var socialButtonDisplay = function () {
if ($('.tab-active a').attr('href') === '#tab-jobad') {
$('.social-buttons-slider').css('visibility', '');
} else {
$('.social-buttons-slider').css('visibility', 'hidden');
}
};
var isMobile = function () {
return $('body').width() < 740;
};
var mobileIframeAvailable = function () {
return $('#jobdetailframe-mobile').length > 0;
};
var calculateIframeHeight = function ($iframe, iframeChildren) {
var nativeHeight = $iframe[0].contentWindow.document.body.offsetHeight;
var parseHeight = Math.max.apply(Math, iframeChildren.map(function () {
var iframeCalc = $(this).outerHeight(true);
return iframeCalc;
}).get());
return Math.max(nativeHeight, parseHeight);
};
var calculateCompanyProfileIframeHeight = function ($iframe, iframeChildren) {
var iframeHeight = Math.max.apply(Math, $iframe.contents().find('html, body, div, table, center, p').map(function () {
var height1 = $(this).height() + parseInt($(this).css('margin-top'), 10) + parseInt($(this).css('margin-bottom'), 10);
var height2 = $(this)[0].scrollHeight;
var height3 = $(this)[0].offsetHeight;
return Math.max(height1, Math.max(height2, height3));
}).get());
return iframeHeight;
};
var tabChanged = function () {
//init print and buttons
socialButtonDisplay();
initTabContentPrint();
if ($('#tab-jobad').hasClass('tab-active')) {
$('.x-jobaddetail-application-btn,.scroll-next-page-link.btn-default').show();
if (!$('#jobdetailframe-mobile').attr('src') && !$('#jobdetailframe').attr('src')) {
loadJobadIframe();
} else {
onResizeHandler();
}
var $locationMap = $("#locationMap");
if ($locationMap.length && $locationMap.prop("src") == "") {
$locationMap.prop("src", $locationMap.data("src"));
}
} else {
$('.x-jobaddetail-application-btn,.scroll-next-page-link.btn-default').hide();
}
if ($('#tab-company-profile').hasClass('tab-active')) {
if (!$('#company-profile-frame').attr('src'))
loadIframeContents($('#company-profile-frame'));
else
resizeIframe($('#company-profile-frame'), calculateCompanyProfileIframeHeight);
}
else if ($('#tab-additional-ads').hasClass('tab-active')) {
if ($('#additional-ads-frame').attr('src')) {
loadIframeContents($('#additional-ads-frame'));
$.when(loadIframeContents($('#additional-ads-frame'))).then(function() { loadAdditionalOffers().done(function() { resizeIframe($('#additional-ads-frame')); }); });
} else {
loadAdditionalOffers();
resizeIframe($('#additional-ads-frame'));
}
}
else if ($('#tab-contact-person').hasClass('tab-active')) {
if (!$('#contact-person-frame').attr('src'))
loadIframeContents($('#contact-person-frame'));
else
resizeIframe($('#contact-person-frame'), calculateCompanyProfileIframeHeight);
}
socialButtonDisplay();
initTabContentPrint();
};
var loadJobadIframe = function () {
$('#jobdetailframe-mobile').hide();
$('#jobdetailframe').hide();
if (isMobile() && mobileIframeAvailable()) {
loadIframeContents($('#jobdetailframe-mobile'));
currentMode = 'mobile';
} else {
loadIframeContents($('#jobdetailframe'));
currentMode = 'standard';
}
};
var loadAdditionalOffers = function () {
var d = new $.Deferred();
if ($('#search-result-list ul:first').html() !== '') {
return;
}
$('#content-loading').show();
$.get('/Suchergebnisse?companyName=Interhyp%2BAG&page=100', function(data) {
$('#search-result-list ul:first').append(data);
$('.list-entry-column-middle,#search-result-list .result-list-entry').css('text-align', 'left');
$('#search-result-list').css({ 'float': 'none', margin: '15px auto 0 auto' }).addClass('clearfix');
$('#content-loading').hide();
$('#searchResultPager').hide();
$('.x-jobaddetail-application-btn,.scroll-next-page-link.btn-default').hide();
d.resolve();
});
return d.promise();
}
var loadIframeContents = function ($iframe) {
$iframe.width($iframe.parents('div:first').width());
$('#content-loading').show();
var deferred = $.Deferred(),
iframe = $iframe.attr({
"src": $iframe.data('src')
});
$iframe.show();
$iframe.load(deferred.resolve);
deferred.done(function () {
applyOnIframeLoad();
});
return deferred.promise();
};
var applyOnIframeLoad = function () {
$('#content-loading').hide();
onResizeHandler();
};
var onResizeHandler = function () {
checkIfModeIsChanged();
if ($('#tab-jobad').hasClass('tab-active')) {
if (isMobile() && mobileIframeAvailable()) {
resizeIframe($('#jobdetailframe-mobile'));
//added so it works on sega offers
setTimeout(function () {
resizeIframe($('#jobdetailframe-mobile'));
}, 300);
} else {
resizeIframe($('#jobdetailframe'));
//added so it works on sega offers
setTimeout(function () {
resizeIframe($('#jobdetailframe'));
}, 300);
}
//check for SEGA accordion
var $accTabs = $('#jobdetailframe').contents().find('.akkordionElement');
$accTabs.off('click');
if ($accTabs.length > 0) {
$accTabs.on('click', function(e) {
setTimeout(function () {
resizeIframe($('#jobdetailframe'));
}, 300);
setTimeout(function () {
resizeIframe($('#jobdetailframe'));
}, 900);
});
}
if ($("#locationMap").length) {
resizeMap($("#locationMap"));
}
}
else if ($('#tab-company-profile').hasClass('tab-active')) {
resizeIframe($('#company-profile-frame'), calculateCompanyProfileIframeHeight);
}
else if ($('#tab-additional-ads').hasClass('tab-active')) {
resizeIframe($('#additional-ads-frame'));
}
else if ($('#tab-contact-person').hasClass('tab-active')) {
resizeIframe($('#contact-person-frame'), calculateCompanyProfileIframeHeight);
}
};
var checkIfModeIsChanged = function () {
if (mobileIframeAvailable()) {
if (isMobile() && currentMode != 'mobile') {
//switch to mobile
if ($('#jobdetailframe-mobile').attr('src') == '') {
loadIframeContents($('#jobdetailframe-mobile'));
} else {
$('#jobdetailframe-mobile').show();
$('#jobdetailframe').hide();
}
currentMode = 'mobile';
} else if (!isMobile() && currentMode == 'mobile') {
//siwtch to standard
if ($('#jobdetailframe').attr('src') === '') {
loadIframeContents($('#jobdetailframe'));
} else {
$('#jobdetailframe-mobile').hide();
$('#jobdetailframe').show();
}
currentMode = 'standard';
}
}
};
var resizeIframe = function ($iframe, heightCalculationFn) {
// Default height calculation function is the one for jobads
if (!heightCalculationFn) {
heightCalculationFn = calculateIframeHeight;
}
if ($iframe.length > 0) {
if ($iframe.contents().find('body, frameset').contents().length > 0) {
var iframeHeight;
var iframeBody = $iframe.contents().find('body');
var iframeChildren = $iframe.contents().find('body, div, table, center, p, img, section, aside, article, header, footer');
var targetWidth;
var marginConstant = 10;
// Remove all constraints to measure natural job ad size
iframeBody.css('-ms-transform', 'none');
iframeBody.css('-webkit-transform', 'none');
iframeBody.css('transform', 'none');
$iframe.css('width', 'auto');
$iframe.attr('scrolling', 'no');
iframeBody.attr('scroll', 'no'); //Internet Explorer
// For responsive ads, we just set width to whatever is possible on current screen
if ($iframe.data('responsive') === 1) {
$iframe.css('width', ($('#jobOffer-content').width()) - marginConstant);
iframeHeight = heightCalculationFn($iframe, iframeChildren);
}
// Non-responsive ads will have to be scaled (like an image)
else {
iframeBody.css('margin', '0px');
iframeBody.css('padding', '0');
targetWidth = Math.max.apply(Math, iframeChildren.map(function () {
// only return elements max width, if it's visible. We had a problem for jobblitz, where 1 element was display none and width set to 9999px
if ($(this).css('display') != 'none') {
return $(this).outerWidth(true);
}
}).get());
$iframe.css('width', $('#jobOffer-content').outerWidth());
var scaleFactor = ($('#jobOffer-content').width() - marginConstant) / targetWidth;
if (scaleFactor >= 1) {
scaleFactor = 1;
$iframe.contents().find('body').css('margin-top', marginConstant + 'px');
$iframe.contents().find('body').css('margin-bottom', marginConstant + 'px');
iframeBody.css('-ms-transform', 'none');
iframeBody.css('-webkit-transform', 'none');
iframeBody.css('transform', 'none');
} else {
$iframe.contents().find('body').css('margin-top', 0);
$iframe.contents().find('body').css('margin-bottom', 0);
iframeBody.css('-ms-transform-origin', '0 0');
iframeBody.css('-ms-transform', 'scale(' + scaleFactor + ')');
iframeBody.css('-webkit-transform-origin', '0 0');
iframeBody.css('-webkit-transform', 'scale(' + scaleFactor + ')');
iframeBody.css('transform-origin', '0 0');
iframeBody.css('transform', 'scale(' + scaleFactor + ')');
// SSS-388: fix ads that are cut off
if (iframeBody.css("border-right-style") == "none" &&
iframeBody.css("border-left-style") == "none" &&
iframeBody.css("border-top-style") == "none" &&
iframeBody.css("border-bottom-style") == "none") {
iframeBody.css('border', '1px solid transparent');
}
}
$iframe.css('height', 'auto');
iframeHeight = heightCalculationFn($iframe, iframeChildren) * scaleFactor;
}
$iframe.css('height', iframeHeight);
if ($('#search-result-list:visible')) {
iframeHeight = iframeHeight + $('#search-result-list').height();
}
if ($iframe.contents().find('frameset').length > 0) {
$iframe.css('height', '1300px');
$iframe.css('overflow', 'auto');
} else {
$iframe.parent().css('height', 'auto');
$iframe.parent().css('overflow', 'hidden');
}
} else {
$iframe.css('height', '90px');
}
}
};
var resizeMap = function ($locationMap) {
var fullSizeWidth = 538;
if ($('#tab-jobad').width() > fullSizeWidth) {
$locationMap.css("width", fullSizeWidth + "px");
$locationMap.css("height", fullSizeWidth * 3/4 + "px");
} else {
$locationMap.css("width", $("#tab-jobad").width() + "px");
$locationMap.css("height", $("#tab-jobad").width() * 3/4 + "px");
}
};
]]>
');
jQuery('body').append('');
}
$(function(){
$('.'+sdeTracking.Config.DruckenClass).on('click',function(){
sdeTracking.generatePixel(1);
});
$('.'+sdeTracking.Config.BewerbenClass).on('click',function(){
sdeTracking.generatePixel(2);
});
$('.'+sdeTracking.Config.WeiterempfehlenClass).on('click',function(){
sdeTracking.generatePixel(3);
});
$('.'+sdeTracking.Config.MerkenClass).on('click',function(){
sdeTracking.generatePixel(4);
});
$(window).on('scroll',function(){
sdeTracking.generatePixel(6);
});
setTimeout(sdeTracking.generatePixel,10000,5);
$(window).on('load', function() {
if ($.cookie('campaign')) {
let cookieArr = $.cookie('campaign').split(',');
cookieArr[1] = '1';
$.cookie('campaign', cookieArr.join(','), {expires: 4, path: '/'});
}
});
});
function bewerben(){
window.location = 'https://jobs.residenz-ambiente.de/de/jobposting/74ecde9f5398875b154bac9d...';
}
]]>