')
$(accordionID + '-controls .daccord-expandcollapse li').eq(1).hide();
$(accordionID + '-controls .daccord-expandcollapse li').on('click',function () {
if ( $(this).index() == 0) {
//expand
$(accordionID + '-controls .daccord-expandcollapse li').eq(0).hide();
$(accordionID + '-controls .daccord-expandcollapse li').eq(1).show();
$(accordionID + ' .daccord-collapse').slideDown(daccordSpeed);
$(accordionID +' .daccord-header').addClass('daccord-header-icon');
}
if ( $(this).index() == 1) {
//collapse
$(accordionID + '-controls .daccord-expandcollapse li').eq(1).hide();
$(accordionID + '-controls .daccord-expandcollapse li').eq(0).show();
$(accordionID + ' .daccord-collapse').slideUp(daccordSpeed);
$(accordionID +' .daccord-header').removeClass('daccord-header-icon');
}
});
}
//if a valid var from url exists override open item setting.
var daccordUrlVar = $.getUrlVar('accordion');
if ($.fn.daccordIsInt(daccordUrlVar)) {
var urlInt = parseInt(daccordUrlVar);
daccordUrlVar = urlInt;
properties.openItem = daccordUrlVar;
}
//Build item object from AEM Vars
var daccordItems = [];
//Item 1
daccordItems[0] = {
itemTitle: "Assistance for applicants with a need for accommodations",
itemText: "
Deloitte is committed to providing equal opportunity and reasonable accommodation for people with disabilities. If you require a reasonable accommodation to complete an application, interview, or otherwise participate in the recruiting process, please direct your inquiries to a recruiter or contact the Global Call Center (GCC) at 615-738-3939 or [email protected].
When you call this number to request accommodation, you must have the information related to the specific position you are interested in (requisition number, job title, location, etc.). Information related to existing profiles or applications will not be provided via this phone number.
Learn more about Deloitte's commitment to hiring and developing individuals with disabilities.
",
itemImage: "${item-1-image}",
itemImageRight: "${item-1-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-1-video-url}",
itemInfographicUrl: "${item-1-infographic-url}"
};
//Item 2
daccordItems[1] = {
itemOpen: "${item-2-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-2-image}",
itemImageRight: "${item-2-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-2-video-url}",
itemInfographicUrl: "${item-2-infographic-url}"
}
//Item 3
daccordItems[2] = {
itemOpen: "${item-3-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-3-image}",
itemImageRight: "${item-3-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-3-video-url}",
itemInfographicUrl: "${item-3-infographic-url}"
};
//Item 4
daccordItems[3] = {
itemOpen: "${item-4-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-4-image}",
itemImageRight: "${item-4-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-4-video-url}",
itemInfographicUrl: "${item-4-infographic-url}"
};
//Item 5
daccordItems[4] = {
itemOpen: "${item-5-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-5-image}",
itemImageRight: "${item-5-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-5-video-url}",
itemInfographicUrl: "${item-5-infographic-url}"
};
//Item 6
daccordItems[5] = {
itemOpen: "${item-6-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-6-image}",
itemImageRight: "${item-6-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-6-video-url}",
itemInfographicUrl: "${item-6-infographic-url}"
};
//Item 7
daccordItems[6] = {
itemOpen: "${item-7-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-7-image}",
itemImageRight: "${item-7-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-7-video-url}",
itemInfographicUrl: "${item-7-infographic-url}"
};
//Item 8
daccordItems[7] = {
itemOpen: "${item-8-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-8-image}",
itemImageRight: "${item-8-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-8-video-url}",
itemInfographicUrl: "${item-8-infographic-url}"
};
//Item 9
daccordItems[8] = {
itemOpen: "${item-9-open}",
itemTitle: " ",
itemText: " ",
itemImage: "${item-9-image}",
itemImageRight: "${item-9-image-right}",
itemMoreText: " ",
itemMoreURL: " ",
itemVideoURL: "${item-9-video-url}",
itemInfographicUrl: "${item-9-infographic-url}"
};
//Item 10
daccordItems[9] = {
itemOpen: "${item-10-open}",
itemTitle: "${item-10-title}",
itemText: "${item-10-text}",
itemImage: "${item-10-image}",
itemImageRight: "${item-10-image-right}",
itemMoreText: "${item-10-read-more-text}",
itemMoreURL: "${item-10-read-more-url}",
itemVideoURL: "${item-10-video-url}",
itemInfographicUrl: "${item-10-infographic-url}"
};
daccordItems = $.fn.daccordScrubData(daccordItems,properties);
//render html within fragID
for (i = 0; i < properties.numberOfItems; i++) {
//add html
var html = dcomAccordionItemTemplate(daccordItems[i]);
$(accordionID).append(html);
//add youtube vids if present
if (daccordItems[i].itemVideoURL) {
//check if one trust group 4 is enabled || if one trust isnt active display anyway
if ((typeof OnetrustActiveGroups === 'undefined') || (OnetrustActiveGroups.indexOf(",4,") >= 0)) {
$(accordionID + ' #' + properties.fragId + 'collapse' + daccordItems[i].itemNum + 'vid').player({
video: daccordItems[i].itemVideoURL,
playerVars: { controls: 2, modestbranding: 0, rel: 0, color: 'white', showinfo: 0, theme: 'dark', autoplay: 0 },
events: { end: daccordVidEnd, play: daccordVidStart, pause: daccordVidStop }
});
//show container ({{fragId}}collapse{{itemNum}}vid-cont)
$(accordionID + ' #' + properties.fragId + 'collapse' + daccordItems[i].itemNum + 'vid-cont').show();
//hide fallback ({{fragId}}collapse{{itemNum}}vid-fallback)
$(accordionID + ' #' + properties.fragId + 'collapse' + daccordItems[i].itemNum + 'vid-fallback').hide();
}
}
}
//set open states
if (properties.openItem > -1) {
daccordSelected = (properties.openItem - 1);
//set item index (minus 1)
$(accordionID +' .daccord-collapse').eq(daccordSelected).slideToggle( daccordSpeed );
if (!properties.expandCollapseAll) {
$(accordionID +' .daccord-header').eq(daccordSelected).toggleClass('daccord-header-open');
} else {
$(accordionID +' .daccord-header').eq(daccordSelected).toggleClass('daccord-header-icon');
}
}
//set css options within fragID
var css = accordionID + ' .daccord-header a {background-color: ' + properties.titlebarBackgroundColor + ' }';
css += accordionID + ' .daccord-header a {color: ' + properties.titlebarFontColor + ' }';
css += accordionID + ' .daccord-header-icon a { background-color: ' + properties.titlebarActiveBackgroundColor + ' }';
css += accordionID + ' .daccord-header-open a { background-color: ' + properties.titlebarActiveBackgroundColor + ' }';
css += accordionID + ' .daccord-header .daccord-header-bar-icon:after { color: ' + properties.titlebarBackgroundColor + ' }';
css += accordionID + ' .daccord-header-icon .daccord-header-bar-icon:after { color: ' + properties.titlebarActiveBackgroundColor + ' }';
css += accordionID + ' .daccord-header-open .daccord-header-bar-icon:after { color: ' + properties.titlebarActiveBackgroundColor + ' }';
$('head').append('');
//set click events
//accordions
$(accordionID + ' .daccord-header').on('click',function() {
var index = $(this).parent().prevAll().length;
//stop (pause) all vids
var daccordVidPlayers = $(accordionID + ' iframe.daccord-video');
$.each(daccordVidPlayers, function () {
var daccordStopVid = YT.get($(this).attr('id'));
daccordStopVid.pauseVideo();
});
if (!properties.expandCollapseAll) {
//close open
if (daccordSelected > -1) {
$(accordionID + ' .daccord-collapse').eq(daccordSelected).slideUp(daccordSpeed);
$(accordionID +' .daccord-header').eq(daccordSelected).removeClass('daccord-header-open');
$(accordionID +' .daccord-header').eq(daccordSelected).removeClass('daccord-header-icon');
}
if (daccordSelected != index ) {
//open selection - add selected state;
daccordSelected = index;
$(accordionID +' .daccord-collapse').eq(daccordSelected).slideDown(daccordSpeed);
$(accordionID +' .daccord-header').eq(daccordSelected).addClass('daccord-header-open');
$(accordionID +' .daccord-header').eq(daccordSelected).addClass('daccord-header-icon');
} else {
daccordSelected = -1;
}
} else {
//set selected if collapse all
daccordSelected = index;
$(accordionID +' .daccord-collapse').eq(index).slideToggle( daccordSpeed );
$(accordionID +' .daccord-header').eq(index).toggleClass('daccord-header-icon');
//check number of items open/closed and set ui
//daccord-header-icon
var daccordOpenItems = $(accordionID +' .daccord-header-icon').length;
//expand if 0
if (daccordOpenItems == 0) {
$(accordionID + '-controls .daccord-expandcollapse li').eq(0).show();
$(accordionID + '-controls .daccord-expandcollapse li').eq(1).hide();
}
//collapse if all opens
if (daccordOpenItems == properties.numberOfItems) {
$(accordionID + '-controls .daccord-expandcollapse li').eq(1).show();
$(accordionID + '-controls .daccord-expandcollapse li').eq(0).hide();
}
}
});
//CTA analytics
var elementClicked = false;
$('#daccord-' + 'accordion' + " a.daccord-header-bar").click(function(e) {
try {
var FragType = "FRG-048";
var FragID = "accordion";
var ActionType = "click";
var ctaText = e.currentTarget.textContent.replace(/\s+/g, '-');
s.linkTrackVars = "prop1,prop2,prop3,prop4,prop5,eVar72";
s.eVar72 = PubID+FragType+":"+ActionType+":"+ctaText+":"+FragID;
s.eVar72 = s.eVar72.toLowerCase();
s.prop1 = sc_country;
s.prop2 = sc_language;
s.prop3 = sc_country + ";" + sc_language;
if(elementClicked != true) {
s.linkTrackEvents = "event71,event72,event23";
s.events = "event71,event72,event23";
elementClicked = true;
} else {
s.linkTrackEvents = "event71,event23";
s.events = "event71,event23";
}
s.tl(this, "o", s.eVar72);
}
catch(error) {
console.error(error);
console.log('analytics suite unavailable?');
}
});
// hide html frag title/description
var hideFragTitleDesc = "yes";
if (hideFragTitleDesc == "title") {
$(accordionID).closest(".htmlfragment").find("h3.secondary-headline").remove();
}
else if (hideFragTitleDesc == "description") {
$(accordionID).closest(".htmlfragment").find("h3.secondary-headline").siblings("p").remove();
}
else if (hideFragTitleDesc == "yes" || hideFragTitleDesc == "true" || hideFragTitleDesc == "both") {
$(accordionID).closest(".htmlfragment").find("h3.secondary-headline").siblings("p").remove();
$(accordionID).closest(".htmlfragment").find("h3.secondary-headline").remove();
}
// add top padding back for topic pages
var templateType = dataLayer.page.attributes.pageTemplate;
if (templateType == "Deloitte_Full_Topic_Page") {
$(accordionID).closest(".standard-white-component").css("padding-top","20px");
}
};
daccord();
});
Follow Life at Deloitte
Follow Life at Deloitte