IL DIOMEDE RIAFFIORATO di Giorgio Salvatori – Numero 8 – Luglio 2017

cat-arte
cat-storia

Diomede, eroe leggendario o veramente esistito? Tanta è la pletorica presenza di Ulisse nell’Iliade e, naturalmente, nell’Odissea, che i più stentano a ricordare la figura del suo valoroso sodale durante gli eventi di Troia. 

 

Eppure, Omero, nell’Iliade, gli dedica il quinto libro, dal titolo “Le gesta di Diomede”, descrivendo l’”aristia” – l’eccellenza dell’eroe – declinata in ripetuti episodi di valore. Valore che non incanta Dante che colloca, invece, Diomede, insieme con Ulisse, nella bolgia dei “male consiglieri” affermando: “E così insieme a la vendetta vanno come a l’ira’’ (Inf.XXVI,56,57). Dante non perdona infatti ai due eroi greci la predisposizione a coltivare sempre una smodata astuzia nel costruire inganni. Destini analoghi, insomma, perfino nelle perigliose avventure che entrambi affrontarono nei viaggi che li ricondussero a casa. Ed è questa la narrazione più tenace legata alla figura di Diomede, che ancora sopravvive nella memoria di quasi tutti gli odierni abitanti delle isole Tremiti. Il perché è strettamente collegato al mito della fondazione di queste isole dell’Adriatico. La storia narrata dagli isolani, estrapolata dai testi classici, rielaborata e riportata su varie pubblicazioni turistiche, ammette alcune varianti.  

 

La più suggestiva attribuisce al nostro eroe la creazione ex nihilo
delle Tremiti, o Diomedee, scaturite dagli abissi dopo il lancio in mare delle pietre che Egli aveva portato con sé da Troia.

 

La leggenda, comunque in tutte le sue versioni, narra sempre che Diomede, dopo essere tornato ad Argo, sentitosi tradito da una moglie infedele e da sudditi ostili, fu costretto a rimettersi in viaggio; ma, a causa di una terribile tempesta, fu spinto sulle acque del mare Adriatico approdando, infine, sulle coste settentrionali della odierna Puglia. Qui decise di fermarsi e fondò diverse città. Il destino riservò, a questo punto, anni di gloria a Diomede, acclamato nella nuova patria, prima, come eroe, poi, come re, dopo atti di ardimento e straordinarie imprese belliche. 

 

Dopo i fasti vissuti in terra dauna, giunse, infine, la morte.
Le spoglie dell’eroe furono sepolte sull’isola di San Nicola,
la più abitata tra le Tremiti, in un luogo mai realmente individuato nonostante una piccola grotta dell’isola venga citata
sulle guide turistiche come ‘’Tomba di Diomede’’.

 

Seguendo un collaudato modello mitopoietico, la leggenda racconta anche che i fedeli compagni dell’eroe greco furono trasformati in uccelli marini dalla dea Afrodite, forse per compassione o forse per vendetta – visto che la dea, durante la guerra di Troia, era stata ferita ad una mano da Diomede mentre tentava di soccorrere suo figlio Enea. Non è un caso che questi uccelli, le berte, vengano chiamati anche “diomedee’’. Il loro verso lamentoso, di notte, sembra a molti un pianto inconsolabile per la perdita della guida ardimentosa dell’amato capo.  

 

Fin qui, la leggenda. Affascinante, romantica, remota. Riscontri pochi
o nulli. Ecco però che, a distanza di oltre tre millenni dal periodo in cui si suppone si siano svolti gli eventi successivi alla guerra di Troia,
riaffiora dalla terra del Gargano un piccolo monile che fornisce
il primo, intrigante indizio della presenza dell’eroe omerico
nella terra dei Dauni.

 

Si tratta di un piccolo anello d’oro di epoca romana, probabilmente risalente al primo secolo dopo Cristo: molti secoli dopo, quindi, gli eventi mitopoietici narrati dalla leggenda omerica. L’anello risulta impreziosito da una gemma che reca la fine incisione di una figura maschile con le sembianze del nostro eroe. La scoperta, inaspettata, durante gli scavi intrapresi in una grande e dimenticata necropoli paleocristiana, individuata già sul finire del diciannovesimo secolo (Del Viscio,1887); poi abbandonata; quindi, riaperta parzialmente negli anni sessanta del secolo scorso e, poi, nuovamente abbandonata fino ad anni recenti, quando, con finanziamenti regionali, nell’antico luogo di sepoltura e alle pendici di un monte boscoso, si è tornato a scavare con nuova lena e mezzi adeguati. 

 

Nel libro che divulga questa scoperta (Biscotti, Giglio, La Rocca, 2016), Luigi La Rocca, Direttore presso la Soprintendenza per i Beni Archeologici della Puglia, afferma che l’anello, con castone in agata, costituisce la prima attestazione iconografica dell’eroe, la cui figura mitica è notoriamente connessa all’area garganica” e descrive l’incisione come inequivocabilmente raffigurante l’eroe greco Diomede che stringe in una mano il Palladio, cioè l’immagine sacra di Pallade Atena, venerata in Ilio e considerata dai Troiani e dai Greci come il più sicuro presidio per la difesa della città. 

 

E, infatti, la leggenda vuole che proprio Diomede, insieme con Ulisse (entrambi travestiti da mendicanti), riuscì a trafugare il prezioso simulacro da Troia e a portarlo via con sé nelle successive peregrinazioni. Un indizio, non una prova, ma, stando alle autorevoli affermazioni di La Rocca, la gemma dell’anello recuperato negli ipogei di Monte Pucci può essere considerata una traccia concreta 

della presenza di Diomede in Puglia. 

 

Qui ritorna la domanda: Diomede invenzione omerica o eroe approdato e vissuto sul Gargano? Rappresentazioni di Diomede, con o senza il Palladio, non sono rare: immagini emerse da tombe etrusche, raffigurate su reperti di epoca romana. Ma, quella riaffiorata dalle viscere del promontorio garganico, è l’unica, fino ad oggi, che fornisca un riscontro tangibile del possibile approdo del leggendario guerriero greco sulle spiagge della Puglia garganica. Pochi hanno dato rilievo alla notizia della scoperta: qualche riga vergata sul lancio di un’agenzia di stampa, brevi articoli di alcuni quotidiani regionali. Eppure, il rinvenimento meriterebbe maggiori approfondimenti, così come più spazio potrebbe essere dedicato alla eccezionale campagna di scavi che si sta conducendo nella necropoli di Monte Pucci, dove l’anello di Diomede è stato trovato. Si tratta infatti di un luogo la cui unicità è attestata da tutti i ricercatori, archeologi, antropologi, botanici, tecnici che stanno partecipando alla campagna di scavi con l’obiettivo di realizzare, sul posto, un museo archeologico e naturalistico ai piedi di una montagna che si affaccia su un mare dalle trasparenti sfumature di azzurro e di verde. 

 

Gli scavi hanno finora restituito ai ricercatori oltre 800 sepolture, 

tutte risalenti al periodo compreso tra il IV e il VII secolo d.C., 

rinvenute in 26 ipogei la cui insolita architettura ha sorpreso 

tutti quelli che hanno preso parte ai lavori.

 

Centinaia i reperti finora classificati tra lucerne, anfore, oggetti di ornamento, oltre ai tanti resti di individui inumati: adulti, bambini, intere famiglie. Una varietà di tombe a loculo, a baldacchino, a fossa semplice, ad “arcosolio” che, difficilmente, trova riscontro in altri siti di inumazione della penisola. Intorno alla necropoli, e sopra gli ipogei, il fortunato visitatore proverà stupore nell’immergersi in una natura rigogliosa dagli intensi colori e dai soavi profumi di flora mediterranea. Protagonisti dello spettacolo sono gli ulivi maestosi, i grandi caprifichi, le rare campanule garganiche. Una cornucopia di piante, di arbusti, di fiori odorosi. Un unicum da tutelare e offrire al pubblico quando saranno terminati i lavori di scavo e completate le opere di recinzione e di sentieristica guidata. Quali scoperte possa riservare ancora la necropoli ai ricercatori è difficile dirlo. Ciò che finora si è trovato, in ogni caso, dovrebbe indurre responsabili politici regionali e amministratori locali a impegnare il massimo delle risorse disponibili per rendere queste scoperte patrimonio diffuso e condiviso. Non sfugge a nessuno, infatti, che i benefici che ne potrebbero derivare per la cultura, l’economia, il turismo di qualità, sarebbero molteplici, vantaggiosi per tutti e, soprattutto, duraturi.

 

 

 

 

 

 

 

 

IL DIOMEDE RIAFFIORATO

 

Giorgio-Salvatori-Viola
SAMSUNG DIGITAL CAMERA
fine-t-blu
UNA_MONTAGNA
var pausehover="on"; var huge_video_playing={}; var autoplayMatch={}; var scrolling; var ifhasthumb ="nonav"; scrolling = pausehover != 'on'; jQuery(window).load(function(){ if(!/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) setTimeout(function(){ jQuery('.huge_it_slide_container_63').mouseleave(); }, 10); }); var YTdeferred = jQuery.Deferred(); window.onYouTubeIframeAPIReady = function() { //resolve when youtube callback is called passing YT as a parameter YTdeferred.resolve(window.YT); }; YTdeferred.done(function(YT) { jQuery('.huge-it-iframe').each(function(){ var el_id = jQuery(this).attr('data-element-id'); var volume = HUGEIT_YT_IFRAMES['iframe'+el_id]['volume']; window['onPlayerReady'+el_id] = function(event) { window['player_'+el_id]['setVolume'](volume); } }); jQuery('.huge-it-iframe').each(function(){ var id = jQuery(this).attr('id'); var el_id = jQuery(this).attr('data-element-id'); var controls = HUGEIT_YT_IFRAMES['iframe'+el_id]['controls']; var showinfo = HUGEIT_YT_IFRAMES['iframe'+el_id]['showinfo']; var url = HUGEIT_YT_IFRAMES['iframe'+el_id]['videoId']; controls||(controls = 0); showinfo||(showinfo = 0); window['player_'+el_id] = new YT.Player(id, { height: '600', width: '900', videoId: url, playerVars: { 'controls': controls, 'showinfo': showinfo, 'rel':0 }, events: { 'onError': window['onPlayerError'+el_id], 'onReady': window['onPlayerReady'+el_id], 'onStateChange': window['onPlayerStateChange'+el_id], 'loop':1 } }); }) }); jQuery(function(){ jQuery('.huge-it-iframe').each(function(){ var el_id = jQuery(this).attr('data-element-id'); var quality = HUGEIT_YT_IFRAMES['iframe'+el_id]['quality']; window['onPlayerStateChange'+el_id] = function(event) { if (event.data == YT.PlayerState.PLAYING) { HUGEIT_YT_IFRAMES['iframe'+el_id]['state']='played'; event.target.setPlaybackQuality(quality); } } }); }); function stopYoutubeVideo(currentVideo,nextVideo) { if(currentVideo) { (HUGEIT_YT_IFRAMES['iframe'+currentVideo]['state'])?currentVideo&&(window['player_'+currentVideo]['pauseVideo']()):currentVideo&&(window['player_'+currentVideo]['stopVideo']()); } nextVideo&&HUGEIT_YT_IFRAMES['iframe'+nextVideo]['autoplay']&&(window['player_'+nextVideo]['playVideo']()); } function stopVimeoVideo(currentVideo,nextVideo){ jQuery(currentVideo).vimeo('pause'); jQuery(nextVideo).vimeo('play'); } /*** initialize And youtube autopay ***/ jQuery( window ).load(function() { (function VimeoOptionsReady(){ //calling funtion once jQuery('.huge-it-iframe-vimeo').each(function(){ var el_id = jQuery(this).attr('data-element-id'); jQuery(this).vimeo('setColor',HUGEIT_VIMEOS['iframe'+el_id]['color']); jQuery(this).vimeo('setVolume',HUGEIT_VIMEOS['iframe'+el_id]['volume']); }) }()); if('off' == 'on') { if(jQuery('.huge-it-iframe-vimeo.autoplay').length) { (function AutoplayVimeo() { var setplayVideo = setInterval(hugeitframe, 100); function hugeitframe() { var vimeo1 = jQuery('.huge_it_slider_63 li').first().find('.autoplay') if(vimeo1.length) { vimeo1.vimeo('play'); clearInterval(setplayVideo); } } }()); } if(jQuery('.huge-it-iframe.autoplay').length) { (function AutoplayYoutube() { var setplayVideo = setInterval(hugeitframe, 100); function hugeitframe() { jQuery('.huge-it-iframe.autoplay').each(function(){ var el_id = jQuery(this).attr('data-element-id'); if(window['player_'+el_id]) { window['player_'+el_id]['playVideo'](); clearInterval(setplayVideo); } }); } }()); } } }); /*** initialize***/ <!-- --> jQuery(document).ready(function() { jQuery('.thumb_wrapper').on('click', function(ev) { var myid = jQuery(this).data('rowid'); myid = parseInt(myid); eval('player_' + myid + '.playVideo()'); ev.preventDefault(); }); }); if(typeof sliderID_array =="undefined") { var sliderID_array=[]; } var data_63 = []; var event_stack_63 = []; data_63["0"]=[];data_63["0"]["id"]="0";data_63["0"]["image_url"]="https://www.myrrha.it/wp-content/uploads/2017/09/foto1.jpg";data_63["0"]["description"]="";data_63["0"]["alt"]="";data_63["1"]=[];data_63["1"]["id"]="1";data_63["1"]["image_url"]="https://www.myrrha.it/wp-content/uploads/2017/09/foto2.jpg";data_63["1"]["description"]="";data_63["1"]["alt"]="";data_63["2"]=[];data_63["2"]["id"]="2";data_63["2"]["image_url"]="https://www.myrrha.it/wp-content/uploads/2017/09/foto3.jpg";data_63["2"]["description"]="";data_63["2"]["alt"]="";data_63["3"]=[];data_63["3"]["id"]="3";data_63["3"]["image_url"]="https://www.myrrha.it/wp-content/uploads/2017/09/foto4.jpg";data_63["3"]["description"]="";data_63["3"]["alt"]=""; var huge_it_trans_in_progress_63 = false; var huge_it_transition_duration_63 = 1000; var huge_interval = {}; var id_array_index = sliderID_array.length; sliderID_array[id_array_index] = // Stop autoplay. window.clearInterval(huge_interval['huge_it_playInterval_'+63]); var huge_it_current_key_63 = ''; function huge_it_move_dots_63() { var image_left = jQuery(".huge_it_slideshow_dots_active_63").position().left; var image_right = jQuery(".huge_it_slideshow_dots_active_63").position().left + jQuery(".huge_it_slideshow_dots_active_63").outerWidth(true); } function huge_it_testBrowser_cssTransitions_63() { return huge_it_testDom_63('Transition'); } function huge_it_testBrowser_cssTransforms3d_63() { return huge_it_testDom_63('Perspective'); } function huge_it_testDom_63(prop) { // Browser vendor CSS prefixes. var browserVendors = ['', '-webkit-', '-moz-', '-ms-', '-o-', '-khtml-']; // Browser vendor DOM prefixes. var domPrefixes = ['', 'Webkit', 'Moz', 'ms', 'O', 'Khtml']; var i = domPrefixes.length; while (i--) { if (typeof document.body.style[domPrefixes[i] + prop] !== 'undefined') { return true; } } return false; } function huge_it_cube_63(tz, ntx, nty, nrx, nry, wrx, wry, current_image_class, next_image_class, direction) { /* If browser does not support 3d transforms/CSS transitions.*/ if (!huge_it_testBrowser_cssTransitions_63()) { jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); return huge_it_fallback_63(current_image_class, next_image_class, direction); } if (!huge_it_testBrowser_cssTransforms3d_63()) { return huge_it_fallback3d_63(current_image_class, next_image_class, direction); } jQuery(current_image_class).css({'z-index': 'none'}); jQuery(next_image_class).css({'z-index' : 2}); huge_it_trans_in_progress_63 = true; /* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); jQuery(".huge_it_slide_bg_63").css('perspective', 1000); jQuery(current_image_class).css({ transform : 'translateZ(' + tz + 'px)', backfaceVisibility : 'hidden' }); jQuery(".huge_it_slideshow_image_wrap_63,.huge_it_slide_bg_63,.huge_it_slideshow_image_item_63,.huge_it_slideshow_image_second_item_63 ").css('overflow', 'visible'); jQuery(next_image_class).css({ opacity : 1, filter: 'Alpha(opacity=100)', backfaceVisibility : 'hidden', transform : 'translateY(' + nty + 'px) translateX(' + ntx + 'px) rotateY('+ nry +'deg) rotateX('+ nrx +'deg)' }); jQuery(".huge_it_slider_63").css({ transform: 'translateZ(-' + tz + 'px)', transformStyle: 'preserve-3d' }); /* Execution steps.*/ setTimeout(function () { jQuery(".huge_it_slider_63").css({ transition: 'all ' + huge_it_transition_duration_63 + 'ms ease-in-out', transform: 'translateZ(-' + tz + 'px) rotateX('+ wrx +'deg) rotateY('+ wry +'deg)' }); }, 20); /* After transition.*/ jQuery(".huge_it_slider_63").one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans)); function huge_it_after_trans() { jQuery(".huge_it_slide_bg_63,.huge_it_slideshow_image_item_63,.huge_it_slideshow_image_second_item_63 ").css('overflow', 'hidden'); jQuery(".huge_it_slide_bg_63").removeAttr('style'); jQuery(current_image_class).removeAttr('style'); jQuery(next_image_class).removeAttr('style'); jQuery(".huge_it_slider_63").removeAttr('style'); // alert(current_image_class+' '+next_image_class); jQuery(current_image_class).css({'opacity' : 0, filter: 'Alpha(opacity=0)', 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, filter: 'Alpha(opacity=100)', 'z-index' : 2}); // huge_it_change_watermark_container_63(); huge_it_trans_in_progress_63 = false; if (typeof event_stack_63 !== 'undefined' && event_stack_63.length > 0) { key = event_stack_63[0].split("-"); event_stack_63.shift(); huge_it_change_image_63(key[0], key[1], data_63, true,false); } } } function huge_it_cubeH_63(current_image_class, next_image_class, direction) { /* Set to half of image width.*/ var dimension = jQuery(current_image_class).width() / 2; if (direction == 'right') { huge_it_cube_63(dimension, dimension, 0, 0, 90, 0, -90, current_image_class, next_image_class, direction); } else if (direction == 'left') { huge_it_cube_63(dimension, -dimension, 0, 0, -90, 0, 90, current_image_class, next_image_class, direction); } } function huge_it_cubeV_63(current_image_class, next_image_class, direction) { /* Set to half of image height.*/ var dimension = jQuery(current_image_class).height() / 2; /* If next slide.*/ if (direction == 'right') { huge_it_cube_63(dimension, 0, -dimension, 90, 0, -90, 0, current_image_class, next_image_class, direction); } else if (direction == 'left') { huge_it_cube_63(dimension, 0, dimension, -90, 0, 90, 0, current_image_class, next_image_class, direction); } } /* For browsers that does not support transitions.*/ function huge_it_fallback_63(current_image_class, next_image_class, direction) { huge_it_fade_63(current_image_class, next_image_class, direction); } /* For browsers that support transitions, but not 3d transforms (only used if primary transition makes use of 3d-transforms).*/ function huge_it_fallback3d_63(current_image_class, next_image_class, direction) { huge_it_sliceV_63(current_image_class, next_image_class, direction); } function huge_it_none_63(current_image_class, next_image_class, direction) { jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2}); /* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); } function huge_it_fade_63(current_image_class, next_image_class, direction) { if (huge_it_testBrowser_cssTransitions_63()) { jQuery(next_image_class).css('transition', 'opacity ' + huge_it_transition_duration_63 + 'ms linear'); jQuery(current_image_class).css('transition', 'opacity ' + huge_it_transition_duration_63 + 'ms linear'); jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2}); } else { jQuery(current_image_class).animate({'opacity' : 0, 'z-index' : 1}, huge_it_transition_duration_63); jQuery(next_image_class).animate({ 'opacity' : 1, 'z-index': 2 }, { duration: huge_it_transition_duration_63, complete: function () {return false;} }); // For IE. jQuery(current_image_class).fadeTo(huge_it_transition_duration_63, 0); jQuery(next_image_class).fadeTo(huge_it_transition_duration_63, 1); } jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); } function huge_it_grid_63(cols, rows, ro, tx, ty, sc, op, current_image_class, next_image_class, direction) { /* If browser does not support CSS transitions.*/ if (!huge_it_testBrowser_cssTransitions_63()) { jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); return huge_it_fallback_63(current_image_class, next_image_class, direction); } huge_it_trans_in_progress_63 = true; /* Set active thumbnail.*/ jQuery(".huge_it_slideshow_dots_63").removeClass("huge_it_slideshow_dots_active_63").addClass("huge_it_slideshow_dots_deactive_63"); jQuery("#huge_it_dots_" + huge_it_current_key_63 + "_63").removeClass("huge_it_slideshow_dots_deactive_63").addClass("huge_it_slideshow_dots_active_63"); /* The time (in ms) added to/subtracted from the delay total for each new gridlet.*/ var count = (huge_it_transition_duration_63) / (cols + rows); /* Gridlet creator (divisions of the image grid, positioned with background-images to replicate the look of an entire slide image when assembled)*/ function huge_it_gridlet(width, height, top, img_top, left, img_left, src, imgWidth, imgHeight, c, r) { var delay = (c + r) * count; /* Return a gridlet elem with styles for specific transition.*/ return jQuery('
').css({ width : width, height : height, top : top, left : left, backgroundImage : 'url("' + src + '")', backgroundColor: jQuery(".huge_it_slideshow_image_wrap_63").css("background-color"), /*backgroundColor: rgba(0, 0, 0, 0),*/ backgroundRepeat: 'no-repeat', backgroundPosition : img_left + 'px ' + img_top + 'px', backgroundSize : imgWidth + 'px ' + imgHeight + 'px', transition : 'all ' + huge_it_transition_duration_63 + 'ms ease-in-out ' + delay + 'ms', transform : 'none' }); } /* Get the current slide's image.*/ var cur_img = jQuery(current_image_class).find('img'); /* Create a grid to hold the gridlets.*/ var grid = jQuery('
').addClass('huge_it_grid_63'); /* Prepend the grid to the next slide (i.e. so it's above the slide image).*/ jQuery(current_image_class).prepend(grid); /* vars to calculate positioning/size of gridlets*/ var cont = jQuery(".huge_it_slide_bg_63"); var imgWidth = cur_img.width(); var imgHeight = cur_img.height(); var contWidth = cont.width(), contHeight = cont.height(), imgSrc = cur_img.attr('src'),/*.replace('/thumb', ''),*/ colWidth = Math.floor(contWidth / cols), rowHeight = Math.floor(contHeight / rows), colRemainder = contWidth - (cols * colWidth), colAdd = Math.ceil(colRemainder / cols), rowRemainder = contHeight - (rows * rowHeight), rowAdd = Math.ceil(rowRemainder / rows), leftDist = 0, img_leftDist = (jQuery(".huge_it_slide_bg_63").width() - cur_img.width()) / 2; /* tx/ty args can be passed as 'auto'/'min-auto' (meaning use slide width/height or negative slide width/height).*/ tx = tx === 'auto' ? contWidth : tx; tx = tx === 'min-auto' ? - contWidth : tx; ty = ty === 'auto' ? contHeight : ty; ty = ty === 'min-auto' ? - contHeight : ty; /* Loop through cols*/ for (var i = 0; i 0) { var add = colRemainder >= colAdd ? colAdd : colRemainder; newColWidth += add; colRemainder -= add; } /* Nested loop to create row gridlets for each col.*/ for (var j = 0; j 0) { add = newRowRemainder >= rowAdd ? rowAdd : rowRemainder; newRowHeight += add; newRowRemainder -= add; } /* Create & append gridlet to grid.*/ grid.append(huge_it_gridlet(newColWidth, newRowHeight, topDist, img_topDst, leftDist, img_leftDist, imgSrc, imgWidth, imgHeight, i, j)); topDist += newRowHeight; img_topDst -= newRowHeight; } img_leftDist -= newColWidth; leftDist += newColWidth; } /* Set event listener on last gridlet to finish transitioning.*/ var last_gridlet = grid.children().last(); /* Show grid & hide the image it replaces.*/ grid.show(); cur_img.css('opacity', 0); /* Add identifying classes to corner gridlets (useful if applying border radius).*/ grid.children().first().addClass('rs-top-left'); grid.children().last().addClass('rs-bottom-right'); grid.children().eq(rows - 1).addClass('rs-bottom-left'); grid.children().eq(- rows).addClass('rs-top-right'); /* Execution steps.*/ setTimeout(function () { grid.children().css({ opacity: op, transform: 'rotate('+ ro +'deg) translateX('+ tx +'px) translateY('+ ty +'px) scale('+ sc +')' }); }, 1); jQuery(next_image_class).css('opacity', 1); /* After transition.*/ jQuery(last_gridlet).one('webkitTransitionEnd transitionend otransitionend oTransitionEnd mstransitionend', jQuery.proxy(huge_it_after_trans)); function huge_it_after_trans() { jQuery(current_image_class).css({'opacity' : 0, 'z-index': 1}); jQuery(next_image_class).css({'opacity' : 1, 'z-index' : 2}); cur_img.css('opacity', 1); grid.remove(); huge_it_trans_in_progress_63 = false; if (typeof event_stack_63 !== 'undefined' && event_stack_63.length > 0) { key = event_stack_63[0].split("-"); event_stack_63.shift(); huge_it_change_image_63(key[0], key[1], data_63, true,false); } } } function huge_it_sliceH_63(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateX = 'min-auto'; } else if (direction == 'left') { var translateX = 'auto'; } huge_it_grid_63(1, 8, 0, translateX, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_sliceV_63(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateY = 'min-auto'; } else if (direction == 'left') { var translateY = 'auto'; } huge_it_grid_63(10, 1, 0, 0, translateY, 1, 0, current_image_class, next_image_class, direction); } function huge_it_slideV_63(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateY = 'auto'; } else if (direction == 'left') { var translateY = 'min-auto'; } huge_it_grid_63(1, 1, 0, 0, translateY, 1, 1, current_image_class, next_image_class, direction); } function huge_it_slideH_63(current_image_class, next_image_class, direction) { if (direction == 'right') { var translateX = 'min-auto'; } else if (direction == 'left') { var translateX = 'auto'; } huge_it_grid_63(1, 1, 0, translateX, 0, 1, 1, current_image_class, next_image_class, direction); } function huge_it_scaleOut_63(current_image_class, next_image_class, direction) { huge_it_grid_63(1, 1, 0, 0, 0, 1.5, 0, current_image_class, next_image_class, direction); } function huge_it_scaleIn_63(current_image_class, next_image_class, direction) { huge_it_grid_63(1, 1, 0, 0, 0, 0.5, 0, current_image_class, next_image_class, direction); } function huge_it_blockScale_63(current_image_class, next_image_class, direction) { huge_it_grid_63(8, 6, 0, 0, 0, .6, 0, current_image_class, next_image_class, direction); } function huge_it_kaleidoscope_63(current_image_class, next_image_class, direction) { huge_it_grid_63(10, 8, 0, 0, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_fan_63(current_image_class, next_image_class, direction) { if (direction == 'right') { var rotate = 45; var translateX = 100; } else if (direction == 'left') { var rotate = -45; var translateX = -100; } huge_it_grid_63(1, 10, rotate, translateX, 0, 1, 0, current_image_class, next_image_class, direction); } function huge_it_blindV_63(current_image_class, next_image_class, direction) { huge_it_grid_63(1, 8, 0, 0, 0, .7, 0, current_image_class, next_image_class); } function huge_it_blindH_63(current_image_class, next_image_class, direction) { huge_it_grid_63(10, 1, 0, 0, 0, .7, 0, current_image_class, next_image_class); } function huge_it_random_63(current_image_class, next_image_class, direction) { var anims = ['sliceH', 'sliceV', 'slideH', 'slideV', 'scaleOut', 'scaleIn', 'blockScale', 'kaleidoscope', 'fan', 'blindH', 'blindV']; /* Pick a random transition from the anims array.*/ this["huge_it_" + anims[Math.floor(Math.random() * anims.length)] + "_63"](current_image_class, next_image_class, direction); } function iterator_63() { return 1; } function huge_it_change_image_63(current_key, key, data_63, from_effect, clicked) { if (data_63[key]) { if (!from_effect) { // Change image key. jQuery("#huge_it_current_image_key_63").val(key); current_key = jQuery(".huge_it_slideshow_dots_active_63").attr("data-image_key"); } if (huge_it_trans_in_progress_63) { event_stack_63.push(current_key + '-' + key); return; } var direction = 'right'; if (huge_it_current_key_63 > key) { direction = 'left'; } else if (huge_it_current_key_63 == key) { return false; } // Set active thumbnail position. huge_it_current_key_63 = key; jQuery("#huge_it_slideshow_image_63").attr('data-image_id', data_63[key]["id"]); jQuery(".huge_it_slideshow_title_text_63").html(data_63[key]["alt"]); jQuery(".huge_it_slideshow_description_text_63").html(data_63[key]["description"]); var current_image_class = "#image_id_63_" + data_63[current_key]["id"]; var next_image_class = "#image_id_63_" + data_63[key]["id"]; if (jQuery(current_image_class).find('.huge_it_video_frame_63').length > 0) { var streffect = 'fade'; if (streffect == "cubeV" || streffect == "cubeH" || streffect == "none" || streffect == "fade") { huge_it_fade_63(current_image_class, next_image_class, direction); } else { huge_it_fade_63(current_image_class, next_image_class, direction); } } else { huge_it_fade_63(current_image_class, next_image_class, direction); } jQuery('.huge_it_slideshow_title_text_63').removeClass('none'); if (jQuery('.huge_it_slideshow_title_text_63').html() == "") { jQuery('.huge_it_slideshow_title_text_63').addClass('none'); } jQuery('.huge_it_slideshow_description_text_63').removeClass('none'); if (jQuery('.huge_it_slideshow_description_text_63').html() == "") { jQuery('.huge_it_slideshow_description_text_63').addClass('none'); } jQuery(current_image_class).find('.huge_it_slideshow_title_text_63').addClass('none'); jQuery(current_image_class).find('.huge_it_slideshow_description_text_63').addClass('none'); huge_it_move_dots_63(); /*** for vimeo and youtube stop pause play etc... ***/ var nextVideo = jQuery('#video_id_63_' + key).attr('data-element-id'); var currentVideo = jQuery('#video_id_63_' + current_key).attr('data-element-id'); /*** add ***/ (currentVideo || nextVideo) && stopYoutubeVideo(currentVideo, nextVideo); if ((jQuery('#player_63_' + current_key)).hasClass('huge-it-iframe-vimeo')) { jQuery('#player_63_' + current_key).vimeo('pause'); } if ((jQuery('#player_63_' + key)).hasClass('huge-it-iframe-vimeo') && ('off' == 'on')) { jQuery('#player_63_' + key).vimeo('play'); } /*** ***/ window.clearInterval(huge_interval['huge_it_playInterval_' +63]); play_63(); } } var staticthumbWidth; jQuery(window).load(function() { staticthumbWidth = jQuery('#huge_it_thumb_slider>li').width(); }); function huge_it_popup_resize_63() { var staticsliderwidth =900; var sliderwidth =900; var bodyWidth = jQuery(window).width(); var parentWidth = jQuery(".huge_it_slideshow_image_wrap_63").parent().width(); if (sliderwidth > parentWidth) { sliderwidth = parentWidth; } if (sliderwidth > bodyWidth) { sliderwidth = bodyWidth; } var str=600/(staticsliderwidth); var str2 =100/900; var sliderDynamicImageHeight = sliderwidth*str; var sliderDynamicThumbHeight = 0; jQuery('.huge_it_slideshow_image_wrap_63').css({'max-height':sliderDynamicImageHeight+sliderDynamicThumbHeight}); jQuery('.huge_it_slideshow_image_wrap1_63').css({'max-height':sliderDynamicImageHeight}); jQuery('.huge_it_slideshow_thumbs_63 li').css({'max-height':sliderDynamicThumbHeight}); jQuery("#huge_it_loading_image_63").css({display: "none"}); jQuery(".huge_it_slideshow_image_wrap1_63").css({opacity: 1}); jQuery(".huge_it_slideshow_image_wrap_63").removeClass("nocolor"); if ("resize"=="crop"){ jQuery(".huge_it_slider_ul li img").each(function(){ if(jQuery(this).prop('naturalWidth')>jQuery(this).prop('naturalHeight')) jQuery(this).css({'width':'100%','height':'auto'/*,'top':'50%','left':'50%','transform':'translate( -50%, -50% )'*/}); else{ jQuery(this).css({'height':'100%','width':'auto'/*,'top':'50%','left':'50%','transform':'translate( -50%, -50% )'*/}); } }); } jQuery(".huge_it_slideshow_image_wrap_63").css({opacity:1}); } jQuery(window).load(function () { jQuery(window).resize(function() { huge_it_popup_resize_63(); }); jQuery('#huge_it_slideshow_left_63').on('click',function(){ huge_it_change_image_63(parseInt(jQuery('#huge_it_current_image_key_63').val()), (parseInt(jQuery('#huge_it_current_image_key_63').val()) - iterator_63()) >= 0 ? (parseInt(jQuery('#huge_it_current_image_key_63').val()) - iterator_63()) % data_63.length : data_63.length - 1, data_63,false,true); return false; }); jQuery('#huge_it_slideshow_right_63').on('click',function(){ huge_it_change_image_63(parseInt(jQuery('#huge_it_current_image_key_63').val()), (parseInt(jQuery('#huge_it_current_image_key_63').val()) + iterator_63()) % data_63.length, data_63,false,true); return false; }); huge_it_popup_resize_63(); /* Disable right click.*/ jQuery('div[id^="huge_it_container"]').bind("contextmenu", function () { return false; }); /*HOVER SLIDESHOW*/ jQuery("#huge_it_slideshow_image_container_63, .huge_it_slideshow_image_container_63, .huge_it_slideshow_dots_container_63,#huge_it_slideshow_right_63,#huge_it_slideshow_left_63").hover(function(){ jQuery("#huge_it_slideshow_right_63").css({'display':'inline'}); jQuery("#huge_it_slideshow_left_63").css({'display':'inline'}); },function(){ jQuery("#huge_it_slideshow_right_63").css({'display':'none'}); jQuery("#huge_it_slideshow_left_63").css({'display':'none'}); }); if(pausehover=="on" && !/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ jQuery("#huge_it_slideshow_image_container_63, .huge_it_slideshow_image_container_63").hover(function(){ window.clearInterval(huge_interval['huge_it_playInterval_'+63]); scrolling = false; },function(){ window.clearInterval(huge_interval['huge_it_playInterval_'+63]); scrolling = true; play_63(); }); } play_63(); }); function play_63(){ if(scrolling || /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)){ huge_interval['huge_it_playInterval_'+63] = setInterval(function () { var iterator = 1; huge_it_change_image_63(parseInt(jQuery('#huge_it_current_image_key_63').val()), (parseInt(jQuery('#huge_it_current_image_key_63').val()) + iterator) % data_63.length, data_63,false,false); }, '4000'); } } jQuery(window).focus(function() { var i_63 = 0; jQuery(".huge_it_slider_63").children("div").each(function () { if (jQuery(this).css('opacity') == 1) { jQuery("#huge_it_current_image_key_63").val(i_63); } i_63++; }); }); jQuery(window).blur(function() { console.log(event_stack_63); window.clearInterval(huge_interval['huge_it_playInterval_'+63]); }); jQuery(window).focus(function() { play_63() });
jQuery(document).ready(function(jQuery) { setInterval(function() { jQuery('.huge_it_slider_63').find("li").each(function() { if (jQuery(this).css("opacity") == "1") { var img_id = jQuery(this).attr('id'); jQuery('.huge_it_slideshow_thumbs_63').each(function() { var allListElements = jQuery('li[id=' + img_id + ']'); jQuery(this).find(allListElements).not(".bx-clone").each(function() { jQuery('.huge_it_slideshow_thumbs_63 li').find(".trans_back").css('background', 'rgba(255,255,255,0.3)'); jQuery(this).find('.trans_back').css('background', 'none'); }) }) } }) }, 100) })