/** * @author jli */ $(document).ready(function(){ $("#displayListe").click(function(){ if ($("#Gallery").get(0) != null){ $("#Gallery").get(0).removePeople(); } }); if ($("#Gallery").get(0) == null){ $("#displayListe").attr('href','/equipe/equipe-list-display'); } }); function loadPerson(xmlId){ $.ajax({ type: "GET", url: "/wp-content/themes/debroux/flash/people.xml", dataType: "xml", success: function(xml) { //alert(xml); $(xml).find('person').each(function(){ var id = $(this).attr('id'); if (id == xmlId) { var name = $(this).attr('name'); var occupation = $(this).attr('occupation'); var directPhone = $(this).attr('directPhone'); var directPhone2 = $(this).attr('directPhone2'); var directPhone3 = $(this).attr('directPhone3'); var bigPhoto = $(this).attr('bigPhoto'); var email = $(this).attr('email'); $("#gNom").html(name); $("#gOccupation").html(occupation); $("#gDirectPhone").html(""); $("#gDirectPhone2").html(""); $("#gDirectPhone3").html(""); $("#gDirectPhone").html(directPhone); $("#gDirectPhone2").html(directPhone2); $("#gDirectPhone3").html(directPhone3); $("#gPhoto").get(0).style.visibility = "hidden"; $("#gPhoto").get(0).style.backgroundImage="none"; $("#gPhoto").get(0).style.filter="none"; $("#gPhoto").get(0).style.backgroundImage="url("+bigPhoto+")"; if($.browser.msie && jQuery.browser.version.substr(0,3) == "6.0"){ //alert(jQuery.browser.version.substr(0,3)); $("#gPhoto").get(0).style.backgroundImage="none"; $("#gPhoto").get(0).style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+bigPhoto+'", sizingMethod="scale")' } $("#gEmail").attr('href',"mailto:"+email); $("#gEmail").html(email); $("#gExp").html(""); $(this).find('exp').each(function(){ var exp = $(this).attr('name'); $("#gExp").append("
  • " + exp + "
  • "); }); $("#gPhoto").get(0).style.top = $(".equipe-top-panel").scrollTop() + $(".equipe-top-panel").innerHeight() - $("#gPhoto").innerHeight() +"px"; $("#gPhoto").get(0).style.visibility ="visible"; } }); } }); } function setSelected(elem){ $('li a').each(function (){ $(this).removeClass('selected_person'); }); $(elem).addClass('selected_person'); }