'; } } $("#list_episodes_accordion").html(content_accordion); $("#liens_episodes").show(); var loaded_vf_video = false; var loaded_vostfr_video = false; if (countProperties(array_links['vf']) > 0) { if (array_links['vf'][index] != undefined && array_links['vf'][index] != "") { if (array_links['vf'][index][0] != undefined && array_links['vf'][index][0] != "") { loaded_vf_video = array_links['vf'][index][0]; } } } if (countProperties(array_links['vostfr']) > 0) { if (array_links['vostfr'][index] != undefined && array_links['vostfr'][index] != "") { if (array_links['vostfr'][index][0] != undefined && array_links['vostfr'][index][0] != "") { $('#play_frame').attr('src', array_links['vostfr'][index][0]); loaded_vostfr_video = array_links['vostfr'][index][0]; } } } if (vf == 'vf') { if (loaded_vf_video != false) { $('#play_frame').attr('src', loaded_vf_video); } else { if (loaded_vostfr_video != false) { $('#play_frame').attr('src', loaded_vostfr_video); } } } if (vf == 'vostfr') { if (loaded_vostfr_video != false) { $('#play_frame').attr('src', loaded_vostfr_video); } else { if (loaded_vf_video != false) { $('#play_frame').attr('src', loaded_vf_video); } } } // if (link_openload != "") { logSerie('14710 ', vf, link_openload); // } //logSerie('14710 ',vf,link_openload); play_episode(vf); }, error: function (e, r, o) { console.log(e + "\n" + r + "\n" + o); }, complete: function () { console.log("log : " + $('#divToroCloseAds0').html()); $('#divToroCloseAds0 > img').attr('src', '../../close.png'); } }); } function countProperties(obj) { var count = 0; for (var prop in obj) { if (obj.hasOwnProperty(prop)) ++count; } return count; } function addClassActive(elem, $type) { $url = elem.href; $('li.lecteurs a.fsctab').removeClass('fscactive'); $(elem).addClass('fscactive'); } last_element_accordion = null; function synchro_list(index_episode, element) { if (last_element_accordion != null) { $(last_element_accordion).attr('id', 'saison_1'); } $('#episodes_list').val(index_episode); $(element).attr('id', 'saison_4'); last_element_accordion = element; play_episode(); init_accordion(index_episode); } function init_accordion(active_option) { var $i = 1; $("#list_episodes_accordion").each(function () { $(this).find('li').each(function () { if ($i == active_option) { $(this).attr('id', 'saison_4'); } else { $(this).attr('id', 'saison_1'); } $i++; }); }); } function play_episode(vf) { var nb_episode = $('#episodes_list').val(); $('#other_seasons').attr('href', window.location.href + '&vv$'); // $html_liste += '