Explore the intricate beauty of the insect world with our collection of real specimens preserved in resin. Each piece showcases the natural structure and detail of the insect, making it ideal for display in the home, office, or personal collection.
Sizes In
');
}
});
if (typeof jQuery.fn.slider === 'undefined') {
jQuery.getScript('catalog/view/javascript/jquery-ui.slider.min.js', function(){
def.resolve();
jQuery('head').append('');
BrainyFilter.init();
// Initialize measurement toggle after BrainyFilter is ready
setTimeout(function() {
initBfMeasurementToggle();
}, 100);
});
} else {
def.resolve();
BrainyFilter.init();
// Initialize measurement toggle after BrainyFilter is ready
setTimeout(function() {
initBfMeasurementToggle();
}, 100);
}
}
});
// Brainy Filter Measurement Toggle Functions
function initBfMeasurementToggle() {
var hasMeasurementFilters = false;
// Check if any filter headers contain measurement units and mark the entire block
jQuery('.bf-attr-header').each(function() {
var $header = jQuery(this);
var text = $header.text().toLowerCase();
var unit = null;
if (text.indexOf('(cm)') > -1) {
unit = 'cm';
} else if (text.indexOf('(inches)') > -1 || text.indexOf('(inch)') > -1) {
unit = 'inches';
}
if (unit) {
hasMeasurementFilters = true;
$header.addClass('bf-measurement-header');
$header.attr('data-original-text', $header.contents().filter(function() { return this.nodeType === 3; }).text().trim());
$header.attr('data-unit', unit);
// Mark all labels and values within this block
var $block = $header.closest('.bf-attr-block');
// Mark all labels in this block
$block.find('label').each(function() {
var $label = jQuery(this);
var labelText = $label.text().trim();
$label.addClass('bf-measurement-value');
$label.attr('data-original-text', labelText);
$label.attr('data-unit', unit);
});
// Mark slider elements
$block.find('.bf-slider-container-wrapper').addClass('bf-measurement-slider-wrapper').attr('data-unit', unit);
$block.find('.bf-slider-text-inp-min, .bf-slider-text-inp-max').addClass('bf-measurement-slider-input').attr('data-unit', unit);
}
});
if (hasMeasurementFilters) {
jQuery('#bf-measurement-toggle').show();
// Bind toggle buttons
jQuery('.bf-unit-btn').on('click', function() {
var unit = jQuery(this).data('unit');
jQuery('.bf-unit-btn').removeClass('active').css({ background: 'transparent', color: '#666' });
jQuery(this).addClass('active').css({ background: '#333', color: '#fff' });
updateBfMeasurementDisplay(unit);
});
// Set default based on currency
var defaultUnit = 'inches';
var currencyCode = (typeof BrainyFilter !== 'undefined' && BrainyFilter.currencyCode) ? BrainyFilter.currencyCode : '';
if (currencyCode) {
var currency = currencyCode.toUpperCase();
if (currency === 'EUR') {
defaultUnit = 'cm';
}
}
// Update button states
jQuery('.bf-unit-btn').removeClass('active').css({ background: 'transparent', color: '#666' });
jQuery('.bf-unit-btn[data-unit="' + defaultUnit + '"]').addClass('active').css({ background: '#333', color: '#fff' });
updateBfMeasurementDisplay(defaultUnit);
}
}
function updateBfMeasurementDisplay(selectedUnit) {
// Update filter headers
jQuery('.bf-measurement-header').each(function() {
var $el = jQuery(this);
var originalText = $el.attr('data-original-text');
var newText = convertBfHeaderText(originalText, selectedUnit);
// Update only the text node, preserve the arrow span
$el.contents().filter(function() { return this.nodeType === 3; }).remove();
$el.prepend(newText + ' ');
});
// Update filter values (labels)
jQuery('label.bf-measurement-value').each(function() {
var $el = jQuery(this);
var originalText = $el.attr('data-original-text');
var sourceUnit = $el.attr('data-unit');
// If no unit in text, append the source unit
var textToConvert = originalText;
if (!/(?:cm|inch(?:es)?)/i.test(originalText)) {
textToConvert = originalText + ' ' + sourceUnit;
}
var convertedText = convertBfValueText(textToConvert, selectedUnit);
// If label has images, we need to preserve them
if ($el.hasClass('bf-has-image')) {
var $img = $el.find('img').clone();
$el.empty().append($img).append(' ' + convertedText);
} else {
$el.text(convertedText);
}
});
// Update select options
jQuery('option.bf-measurement-value').each(function() {
var $el = jQuery(this);
var originalText = $el.attr('data-original-text');
var newText = convertBfValueText(originalText, selectedUnit);
$el.text(newText);
});
// Update slider inputs
jQuery('.bf-measurement-slider-input').each(function() {
var $input = jQuery(this);
var originalValue = $input.attr('data-original-value');
if (originalValue) {
var newValue = convertBfValueText(originalValue, selectedUnit);
$input.val(newValue);
}
});
// Update slider labels (dynamically generated by jQuery UI slider)
jQuery('.bf-measurement-slider-wrapper').each(function() {
var $wrapper = jQuery(this);
var sourceUnit = $wrapper.attr('data-unit');
$wrapper.find('.ui-slider-label, .bf-slider-label').each(function() {
var $label = jQuery(this);
if (!$label.attr('data-original-text')) {
$label.attr('data-original-text', $label.text());
}
var originalText = $label.attr('data-original-text').trim();
// Skip empty labels
if (!originalText) return;
// If no unit in text, append the source unit
var textToConvert = originalText;
if (!/(?:cm|inch(?:es)?)/i.test(originalText)) {
textToConvert = originalText + ' ' + sourceUnit;
}
var convertedText = convertBfValueText(textToConvert, selectedUnit);
$label.text(convertedText);
});
});
}
function convertBfHeaderText(text, targetUnit) {
if (targetUnit === 'inches') {
text = text.replace(/\(cm\)/gi, '(inches)');
} else {
text = text.replace(/\(inches\)/gi, '(cm)');
text = text.replace(/\(inch\)/gi, '(cm)');
}
return text;
}
function convertBfValueText(text, targetUnit) {
// Detect what unit the original value is in
// Updated patterns to handle descriptors like "Baroque", "Deep", "Clear" between dimensions and unit
var isCm = /\d+(?:\.\d+)?(?:\s*(?:x|×|-|to)\s*\d+(?:\.\d+)?)?(?:\s+(?:Baroque|Deep|Clear|Standard|Large|Small|Medium|Mini|Jumbo))?\s*cm(?:\s|$|\.)/i.test(text);
var isInches = /\d+(?:\.\d+)?(?:\s*(?:x|×|-|to)\s*\d+(?:\.\d+)?)?(?:\s+(?:Baroque|Deep|Clear|Standard|Large|Small|Medium|Mini|Jumbo))?\s*inch(?:es)?(?:\s|$|\.)/i.test(text);
if (targetUnit === 'inches' && isCm) {
return convertBfMeasurement(text, 'toInches');
} else if (targetUnit === 'cm' && isInches) {
return convertBfMeasurement(text, 'toCm');
}
return text;
}
function convertBfMeasurement(text, direction) {
// Pattern to match measurements including ranges and dimensions
// Handles: "10 cm", "10 - 20 cm", "10 x 20 cm", "9 x 7 Baroque inches", "9 x 7 Deep inches", etc.
// Added support for descriptors like Baroque, Deep, Clear between dimensions and unit
var pattern = /(\d+(?:\.\d+)?)\s*(?:(x|×|-|to)\s*(\d+(?:\.\d+)?))?\s*(Baroque|Deep|Clear|Standard|Large|Small|Medium|Mini|Jumbo)?\s*(cm|inch(?:es)?)/gi;
return text.replace(pattern, function(match, num1, separator, num2, descriptor, unit) {
var value1 = parseFloat(num1);
var convertedValue1, convertedValue2;
var newUnit;
if (direction === 'toInches') {
if (unit.toLowerCase() === 'cm') {
convertedValue1 = value1 / 2.54;
} else {
return match; // Already in inches
}
newUnit = 'inches';
} else {
// toCm
if (unit.toLowerCase().match(/^inch(?:es)?$/i)) {
convertedValue1 = value1 * 2.54;
} else {
return match; // Already in cm
}
newUnit = 'cm';
}
// Round to reasonable precision
convertedValue1 = Math.round(convertedValue1 * 100) / 100;
convertedValue1 = parseFloat(convertedValue1.toFixed(2));
// Build the descriptor part (e.g., "Baroque", "Deep", "Clear")
var descriptorPart = descriptor ? ' ' + descriptor : '';
// Handle ranges or dimensions (e.g., "10 x 20" or "10 - 20")
if (separator && num2) {
var value2 = parseFloat(num2);
if (direction === 'toInches') {
convertedValue2 = value2 / 2.54;
} else {
convertedValue2 = value2 * 2.54;
}
convertedValue2 = Math.round(convertedValue2 * 100) / 100;
convertedValue2 = parseFloat(convertedValue2.toFixed(2));
return convertedValue1 + ' ' + separator + ' ' + convertedValue2 + descriptorPart + ' ' + newUnit;
}
return convertedValue1 + descriptorPart + ' ' + newUnit;
});
}
BrainyFilter.sliderValues = BrainyFilter.sliderValues || {};
BrainyFilter.sliderValues['a6'] = [{"n":"15","s":"14"}];