var $j=jQuery.noConflict();var language = "fr";var a_time_check_buddy;var i=1,j=1,idd=0,id_rep=0;var div_to_reload="",nbr_reload_page=0,XTMOUT="",close=false;
var chargement = "Chargement ...";
function sendToFriend(a,b){$j("html, body").animate({scrollTop:0},"slow");WaitingContact();$j.get("/annonces/callSend",{id:b,type:a},function(c){recalculatePosition(441,394,"#dialog2");$j("#dialog2").html(c)});return false}function position(){var a=$j(document).height();a=$j(window).width();a=$j(window).height();a=$j(window).width();$j("#dialog2").css("top",0);$j("#dialog2").css("left",a/2-212.5)}function createPagination(a){$j(a).each(function(){$j(this).children("a").each(function(){var b=$j(this).attr("href");b!=undefined&&b.search("javascript")==-1&&$j(this).bind("click",function(){$j("html, body").animate({scrollTop:0},"slow");WaitingEffect();$j.post(b,{noLayout:true,menuid:menuid},function(c){$j(div_to_reload).html(c);createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr, span.categorie_article,div.cat-menu");calculateHeightAjax();$j("#requestURI").val(b);closeEffect();$j("#PollVoteForm").jNice();submitForm();close=true});return false})})})}div_to_reload="";nbr_reload_page=0;var quitterPage=false;
$j(document).ready(function(){submitForm()});function submitForm3(){$j("form").each(function(){var a=$j(this).attr("id");if(navigation=="AJAX"){if(a!="request"||a!="connexion"){$j(this).append('<input type="hidden" name="noLayout" value="true"/>');$j(this).bind("submit",function(){$j("html, body").animate({scrollTop:0},"slow");WaitingEffect();$j(this).ajaxSubmit({url:$j(this).attr("action"),success:function(b,c){if(a=="form3"){$j(".all_content").html(b);$j.get("/account/dashboard",{noLayout:true},function(d){recalculatePosition("#dialog2",425,185);$j(".login").html(d);closeEffect()})}
else{$j(".all_content").html(b);closeEffect()}
quitterPage=close=false}});return false})}}else{$j(this).bind("submit",function(){});}})}
function refreche(){};function createFooter(){}
function submitForm(){$j("textarea").each(function(){
	clas = $j(this).attr('class');
	if(clas != "textMS") {
	$j(this).bind("keyup",function(){quitterPage=true})}
})}function afficheNotification(a){$j.gritter.add({title:"Alerte | Yabiladi.com",text:a})}$j(document).ready(function(){});$j(window).ready(function(){SimplyButtons.init({states:{outer:{active:{backgroundPosition:"left -224px"},inactive:{backgroundPosition:"left -174px"}},inner:{active:{backgroundPosition:"right -224px"},inactive:{backgroundPosition:"right -174px"}}}})});function createIndividualLink(id){if(navigation=="AJAX"){url=$j("#"+id).attr("href");if(url.search("javascript")==-1)
if(quitterPage==false){url=url.replace(/^.*#histo#/,"");$j.historyLoad(url)}
else afficheDialogue(url)}}
function createLink(a){if(navigation=="AJAX"){
	$j(a).each(function(){
		$j(this).children("a").each(function(){
			var b=$j(this).attr("href");
			var cm=$j(this).attr('id');
			var blank = $j(this).attr('target');
			if(cm!="no-link" || blank != "_blank"){
				if(b!=undefined){
					xx=b.split("http://");
					xx2=b.split("https://");
					xxx=b.split("##");
					if(xx2[1]!=null&&xx2[1]!=undefined) {
						xxx=xx2[1].split("/");
					} else if(xx[1]!=null&&xx[1]!=undefined) {
						xxx=xx[1].split("/");	
					}
					else xxx[0]="yabiladi.com";
					if(xxx[0]=="yabiladi.com"||xxx[0]=="www.yabiladi.com")
						$j(this).bind("click",function(){
	if(b.search("javascript")>=0)
return false;
	var c=b.replace(/^.*#histo#/,"");
	$j.historyLoad(c);return quitterPage=false})}}})})}
return false;}
function createLinkAnyMode(id){
	var b=$j("#zap-"+id).attr("href");
	
	var c=b.replace(/^.*#histo#/,"");
	WaitingEffect();
	$j.post(c, {zapping: true, noLayout: true}, function(data) {
		
		$j(".all_content").html(data);
		closeEffect();
	});
	return false;
}
function revalidate(){$j('html, body').animate({scrollTop:0},'slow');WaitingContact();$j.get('/register/callrevalidate',null,function(data){recalculatePosition("#dialog2",425,119);$j("#dialog2").html(data);});return false;}
function checkUrl(){url=document.location.href;tab=url.split("#histo#");if(tab.length>1){$j('#waiting').html('');window.stop();document.location.href=tab[1];}}
function changeNav(type){url=$j('#requestURI').val();$j('#nav').val(type);$j('#link').val(url);document.changenav.submit();}
function getLink(a){a=a.replace(/^.*#histo#/,"");$j.historyLoad(a);quitterPage=false}
function votecomment(a){
	$j.get("/articles/votecomment",{id:a},function(b){if(b!="false")if(b=="already")afficheNotification("Vous avez d\u00e9ja vot\u00e9");else if(b=="yours")afficheNotification("Vous ne pouvez pas voter sur l'un de vos commentaires");else{$j("#buzz_result1-"+a).html(parseInt($j("#buzz_result1-"+a).html())+1);$j("#buttonup1-"+a).html('<img border="0" src="/images/voteupdesactive.png"/>')}else getLogged()})}function repondre(a,b){if(b==1)this.j=1;if(this.j==1||this.idd!=a){$j("#reponse-comm-"+a).fadeIn("slow");$j("#reponse-comm-"+a).html('<div style="text-align:center"><img src="/images/spinner.gif"/></div>');type="article";if($j("#typecomment").val()!=""&&$j("#typecomment").val()!=undefined)type=$j("#typecomment").val();$j.get("/comments/addreponse",{id:a,type:type},function(c){$j(".comment-repondre").html("");$j("#reponse-comm-"+a).html(c);$j("#reponse-comm-"+a).slideDown("slow")});this.j=0;this.idd=a}else{this.j=1;$j("#reponse-comm-"+a).slideUp("slow");$j("#reponse-comm-"+a).fadeOut("slow");this.idd=0}}function afficherReponse(a,b,c){if(this.i==1){$j("#com-rep-"+c).html('<div style="text-align:center"><img src="/images/spinner.gif"/></div>');$j.post("/comments/showreponse",{id:a},function(d){$j("#com-rep-"+c).html(d);$j("#com-rep-"+c).slideDown("slow");$j("#com-rep-"+c).fadeIn("slow");$j(".rep-up").addClass("rep-down");$j(".rep-up").removeClass("rep-up")});this.i=0}else{this.i=1;$j("#com-rep-"+c).slideUp("slow");$j("#com-rep-"+c).fadeOut("slow");$j(".rep-down").addClass("rep-up");$j(".rep-down").removeClass("rep-down")}}function WaitingEffect(){$j("#waiting").html('<div style="float:left; width:100%; padding-top:4px;"><img src="http://static.yabiladi.com/images/loading.gif" align="absmiddle"/> ' + chargement + '</div>').fadeIn(100)}
function WaitingContact(){$j("#dialog2").html("");var a=$j(document).height(),b=$j(window).width();$j("#mask").css({width:b,height:a});$j("#mask").fadeIn(0);$j("#mask").fadeTo("fast",0.4);a=$j(window).height();b=$j(window).width();$j("#dialog2").css("top",a/2-$j("#dialog2").height()/2);$j("#dialog2").css("left",b/2-$j("#dialog2").width()/2);$j("#dialog2").fadeIn(2E3)}function closeEffect(){$j("#mask").fadeOut();$j(".window").fadeOut();$j("#dialog2").fadeOut();$j("#dialog3").fadeOut();$j("#dialog2").html("");clearInterval(XTMOUT);$j("#waiting").fadeOut()}function getArticleByCategorie(a,b){WaitingEffect();if(b=="all")b="%";$j("html, body").animate({scrollTop:0},"slow");$j.get("/articles/",{noLayout:true,type:b,cat:a},function(c){$j(".all_content").html(c);calculateHeightAjax();createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr,span.categorie_article,div.cat-menu");closeEffect()})}function getLogged(){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.get("/login/getlogged",{noLayout:true},function(a){recalculatePosition("#dialog2",425,187);$j("#dialog2").html(a)})}
function recalculatePosition(a,b,c){var d=$j(document).height();d=$j(window).width();d=$j(window).height();var e=$j(window).width();$j(a).css("top",d/2-c/2);$j(a).css("left",e/2-b/2)}
function afficheDialogue(a){$j("html, body").animate({scrollTop:0},"slow");WaitingContact();var b=$j(window).height(),c=$j(window).width();$j("#dialog2").css("top",b/2-75);$j("#dialog2").css("left",c/2-212.5);dialog(a)}function dialog(a){$j("#waiting").html("").css({display:"none"});$j("#requestURI").val(a);$j("#dialog2").html('<div class="search-bloc" id="search-bloc" style="width:425px;"><div class="search-title" style="width:420px;">Voullez vous vraiment quitter la page ?<div class="close"><a href="javascript://" onclick="closeAdvanced2()">X</a></div></div><div id="dialog-confirm" title="Voullez vous vraiment quitter cette page ?"><div class="news" style="margin-top:10px; font-weight:bold; width:405px; padding-right:10px; margin-bottom:10px;padding-bottom:15px;width:404px">Vous allez quitter cette page sans soumettre le formulaire que vous venez de remplir, \u00eates-vous s\u00fbr ?</div></div><div class="bottom_dialog"><input type="button" onclick="closeAdvanced2()" value="Annuler"/> <input type="button" id="quitter" value="Quitter la page" onclick="quitterPageOk()"/></div></div>')}
function quitterPageOk(){link=$j("#requestURI").val();$j("#dialog2").html('');$j("#dialog3").html('');closeEffect();$j.post(link,{noLayout:true,menuid:menuid},function(a){WaitingEffect();$j(".all_content").html(a);quitterPage=false;createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.image span, div.on_ligne,td.name, td.subject, div.label_login, p#bloque, div.paragraph, tr.item div.image span, div.actions ul.actions li.pictures, div.actions ul.actions li.remove, div.actions ul.actions li.edit, div.dashboard_member_entry, div.actions ul.actions li.friends,div.actions ul.actions li.message, div.header_menu ul li, div.site_stats_top ul li,div.new_member_container div.new_members_girls_style span, div.footer span, td.data h2, ul.actions li.profile, ul.actions li.message, div.image, div.options ul li, div.bloc_content_elements div.paginate");createLink("div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr,span.categorie_article,div.cat-menu");closeEffect();$j("#PollVoteForm").jNice();submitForm()})}
function closeAdvanced2(){closeAdvancedOut2();$j.scrollTo("#add_comment",800)}function closeAdvancedOut2(){var a=$j(document).height();a=$j(window).width();a=$j(window).height();var b=$j(window).width();$j("#dialog2").css("top",a/2-10);$j("#dialog2").css("left",b/2-25);$j("#dialog3").css("top",a/2-10);$j("#dialog3").css("left",b/2-25);$j("#mask").fadeOut();$j(".window").fadeOut();$j("#dialog2").html('<img src="http://static.yabiladi.com/images/loading.gif" alt="chargement..."/>')}$j(document).ready(function(){createFooter()});function reloadPubHeader(a,b){a="http://i.ycdn.org/pub.php?d="+(new Date).getTime()+"&format_pub=header_new_Yabiladi&page_title="+a+"&page_description="+b;$j("#pub_header_new_Yabiladi").html("");$j("#pub_header_new_Yabiladi").append('<iframe id="frame_pub_header" style="border:0;width:728px;height:90px;margin:0;padding: 0"/>');$j("#frame_pub_header").attr("src",a);}function calculateHeight(){}function calculateHeightAjax(){}
function reloadPubFooter(a,b){a="http://i.ycdn.org/adsense.php?d="+(new Date).getTime()+"&format_pub=728_15&page_title="+a+"&page_description="+b;$j("#footer_ads").html("");$j("#footer_ads").append('<iframe id="frame_pub_footer" style="border:0;width: 728px;height: 15px;margin:0;padding:0"/>');$j("#frame_pub_footer").attr("src",a);}
function pageload(a){if(navigation=="AJAX"){a||(a=$j("#firstRequestURI").val());if(window.pageload_rencontre)pageload_rencontre(a);else if(quitterPage==false){WaitingEffect();x=a.split("#");$j.ajax({url:x[0],type:"POST",data:"noLayout=true",async:true,cache:true,success:function(b){$j(".all_content").html(b);calculateHeightAjax();$j("#requestURI").val(a);closeEffect();clearInterval(XTMOUT);$j("#PollVoteForm").jNice();submitForm();x[1]!=null?$j.scrollTo("#"+x[1],800):$j("html, body").animate({scrollTop:0},"slow");createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr,span.categorie_article,div.cat-menu")},error:function(){$j("#waiting").html('<div style="float:left;padding-top:3px; width:100%;"><img src="/images/error-loading.png" align="absmiddle"/> Connexion echou\u00e9e !!</div>').fadeIn(100);var b=setInterval(function(){clearInterval(b);closeEffect()},3E4)}})}else afficheDialogue(a);}}
function slideOnlineUser(){$j("#user-cacher").slideToggle(300);$j("#show-hide").html()==""?$j("#show-hide").html("+"):$j("#show-hide").html("");setTimeout("beforeslideOnlineUser()",300)}function connexionRencontre(){if(validate($j("#field_username").val())){WaitingEffect();$j("#rreturn").val($j("#requestURI").val());urlsend=$j("#requestURI").val()==null||$j("#requestURI").val()==""?"/rencontres":$j("#requestURI").val();$j("#form3").ajaxSubmit({url:"/login",success:function(a,b){$j.post(urlsend,{noLayout:true},function(c){recalculatePosition();$j(".all_content").html(c);$j.get("/account/dashboard",{noLayout:true},function(d){recalculatePosition();$j(".login").html(d)});closeEffect()})}})}else alert("Entrez une adresse email valide!")}function beforeslideOnlineUser(){calculFrameRight();calculateHeightAjax()}
function submitForm5(){$j("form").each(function(){var a=$j(this).attr("id");if(navigation=="AJAX"){if(a!="request"||a!="connexion"){$j(this).append('<input type="hidden" name="noLayout" value="true"/>');$j(this).append('<input type="hidden" name="nolayoutform" value="true"/>');$j(this).bind("submit",function(){WaitingEffect();$j("html, body").animate({scrollTop:0},"slow");$j(this).ajaxSubmit({url:$j(this).attr("action"),success:function(b,c){$j(".all_content").html(b);closeEffect();quitterPage=false}});return false})}}else{$j(this).bind("submit",function(){});}});}
function calculFrameRight(){var a=$j("#onligneuser").height(),b=$j("#blocleft").height();b=$j(".contenuf").innerHeight();var c=$j("#md").height();if(c>0)c+=17;else c=0;pubpos=c+$j("#onligneuser1").height()+30;$j("#onligneuser").css({top:c+"px"});$j("#pub_sky").css({top:pubpos+"px"});$j("#forumpub").css({top:pubpos+"px"});c=$j("#blocleft").height()+$j("#onligneuser1").height();b<c+80&&$j(".contenuf").css({height:b+a+80+"px"});a=$j("#page-info").height()}function ratingstar_toggle(a,b,c){for(var d=1;d<=b;d++){var e=$j("#ratingstar"+a+"__"+d)[0];e.src=c=="show"?e.src.replace(/rate0/,"rate1"):e.src.replace(/rate1/,"rate0")}}function submit_rating(a,b,c,d,e){$j.post(virpath+"index.php?m=rating",{type:a,score:d,member_id:b,content_id:c},function(f){f=f.split("\n");if(f.length==2)if(f[0]=="ok"&&f[1])if(typeof e!="undefined")window.location=e;else{$j("#rating_"+a+"_box"+c).html('<p class="response">'+f[1]+"</p>");return true}})}function send_wink(a,b){$j.get(virpath+"index.php?m=account_messages&p=quickmessage",{id:a,sid:b,noLayout:true},function(c){$j(".all_content").html(c)})}function submit_report(a,b,c,d){var e=$j("#report_"+a+"_reason"+c).val();e?$j.post(virpath+"index.php?m=report",{type:a,reason:e,member_id:b,content_id:c},function(f){f=f.split("\n");if(f.length==2)if(f[0]=="ok"&&f[1]){$j("#report_"+a+"_box"+c).html('<p class="response">'+f[1]+"</p>");return true}}):alert(d)}function submit_poll(a,b){$j.post(virpath+"index.php?m=vote",{poll_id:a,answer_id:b,noLayout:true},function(c){c=c.split("\n");if(c.length==3){if(c[0]=="ok"&&c[1]){$j("#poll_votes_"+a).html(c[1]);c=c[2].split(",");for(var d=0,e=c.length;d<e;d++){var f=c[d].split("=");if(f.length==2){$j("#poll_"+a+"_answer_votes_"+f[0]).html(f[1]);$j("#poll_"+a+"_answer_votes_"+f[0]+"_wrap").css("display","inline")}$j("#poll_"+a+"_answer_"+d).attr("disabled","disabled")}return true}}else if(c.length==2)if(c[0]=="ok"&&c[1]){$j("#poll_votes_"+a).html(c[1]);for(d=0;$j("#poll_"+a+"_answer_"+d)!=null;d++)$j("#poll_"+a+"_answer_"+d).attr("disabled","disabled");return true}})}function row_toggle(a){for(var b=0;document.getElementById(a+"_"+b)!=null;b++)document.getElementById(a+"_"+b).style.display=="none"?$j("#"+a+"_"+b).show():$j("#"+a+"_"+b).hide()}function row_switch(a){$j("#"+active_tab).hide();$j("#"+a).show();active_tab=a}var active_tab=0,active_tab_first=1;
function switch_tabs(a,b,c){for(i=1;i<6;i++){$j("#profile_data_"+i+"_content").hide();}

if(XT){clearTimeout(XT);}
var tab_width=0;if(typeof c!="undefined"){if(active_tab_first==1){$j("#"+a+"_"+b+"_content").show();active_tab=b;active_tab_first=0}}else if(active_tab!=b){if(b>0||b<6){for(i=1;i<=b;i++){tab_width=tab_width+$j('#'+a+'_'+i+'_li').width();}
tab_width=tab_width-$j('#'+a+'_'+b+'_li').width();
if(langue == "ar") {
	$j('#cursor_black').animate({left:"-"+tab_width+"px"},300);	
} else {
	
	$j('#cursor_black').animate({left:tab_width+"px"},300);
}
}
$j("#"+a+"_"+active_tab+"_content").hide();$j("#"+a+"_"+b+"_content").show(300);active_tab=b}}

var precedent=0;var XT=0;
function slideTab(id){var tab_width=0;for(i=1;i<6;i++){if(i!=id){$j("#profile_data_"+i+"_content").hide();}}
if(id>0||id<6){for(i=1;i<=id;i++){tab_width=tab_width+$j('#profile_data_'+i+'_li').width();}
tab_width=tab_width-$j('#profile_data_'+id+'_li').width();$j('#cursor_black').animate({left:tab_width+"px"},300);}
$j("#profile_data_"+id+"_content").show(300);}
function slideTabAr(id){
	var tab_width=0;
	for(i=1;i<6;i++){
		if(i!=id){$j("#profile_data_"+i+"_content").hide();}
	}
	if(id>0||id<6){
		for(i=1;i<=id;i++){
			tab_width=tab_width+$j('#profile_data_'+i+'_li').width();
		}
		tab_width=tab_width-$j('#profile_data_'+id+'_li').width();
		$j('#cursor_black').animate({left:"-"+(tab_width)+"px"},300);}
		$j("#profile_data_"+id+"_content").show(300);}

function playTab(id){if(id>=0){precedent++;}else if(id>=5){precedent=0;}
if(precedent>5){precedent=1;}
active_tab=precedent;$j('#test').html(precedent);slideTab(precedent);XT=setTimeout("playTab(precedent)",10000);}
function playTabAr(id){if(id>=0){precedent++;}else if(id>=5){precedent=0;}
if(precedent>5){precedent=1;}
active_tab=precedent;$j('#test').html(precedent);slideTabAr(precedent);XT=setTimeout("playTabAr(precedent)",10000);}
function showhide_field(a,b){$j("#"+a).css("display")=="none"&&(b==""||b==undefined)||b==1?$j("#"+a).fadeIn("fast"):$j("#"+a).fadeOut("fast")}
function sinviterEvenement(a){if(a!="")window.location=a;return 1}
function confirmLink(a,b){
	if(navigation=="AJAX"){
		var c=confirm(a);
		if(c&&b!=""){
		$j("html, body").animate({scrollTop:0},"slow");
		if(a=="Etes-vous sûr de bien vouloir supprimer cette photo?" ^ a=="Etes-vous sûr de bien vouloir mettre cette photo comme couverture par defaut de votre profil?" ^ a=="Voulez-vous vraiment supprimer votre photo de ce compte?"^a=="Etes-vous sûr de bien vouloir supprimer ce membre de votre liste noire?"^a=="Etes-vous sûr de bien vouloir supprimer ce membre de votre liste ami(e)s?"^a=="Etes-vous sûr de bien vouloir accepter cette demande?"^a=="Etes-vous sûr de bien vouloir supprimer le message sélectionné?")
$j.get(b,{noLayout:true},function(d){$j(".all_content").html(d);createLink();closeEffect();submitForm3()});
		else{WaitingEffect();$j("#myForm").ajaxSubmit({url:b,success:function(d,e){$j(".all_content").html(d);createLink();closeEffect();submitForm3()}})}}return c}
else{var is_confirmed=confirm(a);if(is_confirmed&&b!='')
window.location=b;return is_confirmed;}}
function confirmForm(a,b){if(navigation=="AJAX"){if((a=confirm(a))&&b!=""){$j("[name$="+b+"]").attr({id:"myForm"});WaitingEffect();$j("#myForm").ajaxSubmit({url:$j("#myForm").attr("action"),success:function(c,d){$j(".all_content").html(c);createLink();closeEffect();submitForm3()}})}
return a}else{var is_confirmed=confirm(a);if(is_confirmed&&b!='')
eval('document.'+b+'.submit()');return is_confirmed;}}  
function toggleMessages(a,b){for(var c=0;c<a.elements.length;c++)if(a.elements[c].type=="checkbox")a.elements[c].checked=b}function stylizeBooleanBox(a,b){for(var c=document.getElementById(a+b),d=0,e=c.length;d<e;d++){c[d].style.background=c[d].value==1?"#DEFAE0":"#FBDDDD";if(c[d].value==1&&c[d].selected)document.getElementById(a+b).style.background="#DEFAE0";else if(c[d].value==0&&c[d].selected)document.getElementById(a+b).style.background="#FBDDDD"}}$j.fn.ToolTip=function(a){this.mouseover(function(b){if(!(!this.title&&!this.alt&&!this.tooltipset)){var c=b.pageX||(b.clientX?b.clientX+document.body.scrollLeft:0);b=b.pageY||(b.clientY?b.clientY+document.body.scrollTop:0);c+=10;b+=10;if(!this.tooltipdiv){var d=document.createElement("div");this.tooltipdiv=d;$j(d).addClass(a||"tooltip");$j(d).html(this.title||this.alt);this.alt=this.title="";$j("body").append(d);this.tooltipset=true}$j(this.tooltipdiv).fadeIn("fast").css({left:c+"px",top:b+3+"px"})}}).mouseout(function(){this.tooltipdiv&&$j(this.tooltipdiv).fadeOut("fast")});return this};$j.fn.ToolPic=function(a){this.mouseover(function(b){if(this.name||this.tooltipset){var c=b.pageX||(b.clientX?b.clientX+document.body.scrollLeft:0);b=b.pageY||(b.clientY?b.clientY+document.body.scrollTop:0);c+=10;b+=10;if(!this.tooltipdiv){var d=document.createElement("div");this.tooltipdiv=d;$j(d).addClass(a||"tooltip");$j(d).html('<img src="'+this.name+'"/>');this.alt=this.title="";$j("body").append(d);this.tooltipset=true}$j(this.tooltipdiv).fadeIn("fast").css({left:c+"px",top:b+3+"px"})}}).mousemove(function(b){if(this.name&&this.tooltipset){var c=b.pageX||(b.clientX?b.clientX+document.body.scrollLeft:0);b=b.pageY||(b.clientY?b.clientY+document.body.scrollTop:0);c+=10;b+=10;$j(this.tooltipdiv).css({left:c+"px",top:b+3+"px"})}}).mouseout(function(){this.tooltipdiv&&$j(this.tooltipdiv).fadeOut("fast")});return this};function selectSmiley(a,b){var c=$j("#"+b).val();c=c+""+smilies[a].shortcut;$j("#"+b).val(c)}var chatwincurr=0,autocheck=0,autodelay=8,virpath="";chatwins=[];
function checkChat(a,b,c){virpath=a;autocheck=b;autodelay=c;checkChatText()}function checkChatText(){$j.post(virpath+"chat.php?p=check",{},function(a){if(a!="0")openChatWindow(a);else autocheck&&setTimeout("checkChatText()",autodelay*1E3)})}function openChatWindow(a){if(a>0&&(typeof chatwins["chat"+a]!="object"||chatwins["chat"+a].closed)){chatwins["chat"+a]=window.open(virpath+"index.php?m=account_chat&p=request&id="+a,"chat"+a,"width=470,height=410,resizable=yes,scrollbars=no,toolbar=no,location=no,status=no,menubar=no");chatwins["chat"+a]&&chatwins["chat"+a].open?chatwins["chat"+a].focus():alert("Could not open a chat window. Please disable your popup blocker.")}}function trim(a){return a.replace(/^\s+|\s+$/g,"")}function favoris(){navigator.appName!="Microsoft Internet Explorer"?window.sidebar.addPanel("Yabiladi.com : Le Maroc \u00e0 port\u00e9e de clic!","http://www.yabiladi.com/",""):window.external.AddFavorite("http://www.yabiladi.com/","Yabiladi.com : Portail des marocains sans fronti\u00e8res")}
function contact(){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.post("/home/contact",{noLayout:true,menuid:1},function(a){position();$j("#dialog2").html(a)})}function position(){var a=$j(document).height();a=$j(window).width();a=$j(window).height();a=$j(window).width();$j("#dialog2").css("top",0);$j("#dialog2").css("left",a/2-212.5)}
function showSMS(){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.post("/sms/ajax",{noLayout:true},function(a){$j("#dialog2").html(a);recalculatePosition("#dialog2",615,340);})}
function position(){var a=$j(document).height();a=$j(window).width();a=$j(window).height();a=$j(window).width();$j("#dialog2").css("top",0);$j("#dialog2").css("left",a/2-212.5)}
function pageload2(a){a||(a=$j("#firstRequestURI").val());if(quitterPage==false){WaitingEffect();x=a.split("#");$j.ajax({url:x[0],type:"POST",data:"noLayout=true",async:true,cache:true,success:function(b){$j("html, body").animate({scrollTop:0},"slow");$j(".all_content").html(b);$j("#requestURI").val(a);x[1]!=null?$j.scrollTo("#"+x[1],800):$j("html, body").animate({scrollTop:0},"slow");createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr,span.categorie_article,div.cat-menu");closeEffect();clearInterval(XTMOUT);$j("#PollVoteForm").jNice();submitForm()},error:function(b){$j("#waiting").html('<div style="float:left;padding-top:3px; width:100%;"><img src="/images/error-loading.png" align="absmiddle"/> Connexion echou\u00e9e !!</div>').fadeIn(100);var c=setInterval(function(){clearInterval(c);closeEffect()},3E4)}})}else afficheDialogue(a)}function mycarousel_initCallback(a){a.buttonNext.bind("click",function(){a.startAuto(0)});a.buttonPrev.bind("click",function(){a.startAuto(0)});a.clip.hover(function(){a.stopAuto()},function(){a.startAuto()})}$j.easing.BounceEaseOut=function(a,b,c,d,e){return(b/=e)<1/2.75?d*7.5625*b*b+c:b<2/2.75?d*(7.5625*(b-=1.5/2.75)*b+0.75)+c:b<2.5/2.75?d*(7.5625*(b-=2.25/2.75)*b+0.9375)+c:d*(7.5625*(b-=2.625/2.75)*b+0.984375)+c};
function pageload22(a){WaitingEffect();a||(a=$j("#firstRequestURI").val());if(quitterPage==false)if(menuid==1){x=a.split("#");$j.ajax({url:x[0],type:"POST",data:"noLayout=true",async:true,cache:true,success:function(b){$j(".all_content").html(b);$j("#PollVoteForm").jNice();$j("#requestURI").val(a);createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr");closeEffect();x[1]!=null?$j.scrollTo("#"+x[1],800):$j("html, body").animate({scrollTop:0},"slow")},error:function(b){$j("#waiting").html('<div style="float:left;padding-top:3px; width:100%;"><img src="/images/error-loading.png" align="absmiddle"/> Connexion echou\u00e9e !!</div>').fadeIn(100);var c=setInterval(function(){clearInterval(c);closeEffect()},3E4)}})}else{x=a.split("#");$j.ajax({url:x[0],type:"POST",data:"noLayout=true&menuid="+menuid,async:true,cache:true,success:function(b){$j(".all_content").html(b);$j("#PollVoteForm").jNice();$j("#requestURI").val(a);createLink("div.content-details p,div.content-details p span, div.content-details p span span,div.title_song, div.pic ,div.element_entries span, div.programme_img, div.langue_right, tr td span, div.advanced, div.tags ul li, div.photo-focus, div.focus-title, div.focus-extrait, div.agenda-extrait, div.titre-recent, div.extrait-art, div.article-nbr");closeEffect();x[1]!=null?$j.scrollTo("#"+x[1],800):$j("html, body").animate({scrollTop:0},"slow")},error:function(b){$j("#waiting").html('<div style="float:left;padding-top:3px; width:100%;"><img src="/images/error-loading.png" align="absmiddle"/> Connexion echou\u00e9e !!</div>').fadeIn(100);var c=setInterval(function(){clearInterval(c);closeEffect()},3E4)}})}else afficheDialogue(a)};function confirmDelete(question,url)
{var is_confirmed=confirm(question);if(is_confirmed&&url!='')
window.location=url;return is_confirmed;}
(function($){$.fn.jcarousel=function(o){return this.each(function(){new $jc(this,o);});};var defaults={vertical:false,start:1,offset:1,size:null,scroll:3,visible:null,animation:'normal',easing:'swing',auto:0,wrap:null,initCallback:null,reloadCallback:null,itemLoadCallback:null,itemFirstInCallback:null,itemFirstOutCallback:null,itemLastInCallback:null,itemLastOutCallback:null,itemVisibleInCallback:null,itemVisibleOutCallback:null,buttonNextHTML:'<div></div>',buttonPrevHTML:'<div></div>',buttonNextEvent:'click',buttonPrevEvent:'click',buttonNextCallback:null,buttonPrevCallback:null};$.jcarousel=function(e,o){this.options=$.extend({},defaults,o||{});this.locked=false;this.container=null;this.clip=null;this.list=null;this.buttonNext=null;this.buttonPrev=null;this.wh=!this.options.vertical?'width':'height';this.lt=!this.options.vertical?'left':'top';var skin='',split=e.className.split(' ');for(var i=0;i<split.length;i++){if(split[i].indexOf('jcarousel-skin')!=-1){$(e).removeClass(split[i]);var skin=split[i];break;}}
if(e.nodeName=='UL'||e.nodeName=='OL'){this.list=$(e);this.container=this.list.parent();if(this.container.hasClass('jcarousel-clip')){if(!this.container.parent().hasClass('jcarousel-container'))
this.container=this.container.wrap('<div></div>');this.container=this.container.parent();}else if(!this.container.hasClass('jcarousel-container'))
this.container=this.list.wrap('<div></div>').parent();}else{this.container=$(e);this.list=$(e).find('>ul,>ol,div>ul,div>ol');}
if(skin!=''&&this.container.parent()[0].className.indexOf('jcarousel-skin')==-1)
this.container.wrap('<div class=" '+skin+'"></div>');this.clip=this.list.parent();if(!this.clip.length||!this.clip.hasClass('jcarousel-clip'))
this.clip=this.list.wrap('<div></div>').parent();this.buttonPrev=$('.jcarousel-prev',this.container);if(this.buttonPrev.size()==0&&this.options.buttonPrevHTML!=null)
this.buttonPrev=this.clip.before(this.options.buttonPrevHTML).prev();this.buttonPrev.addClass(this.className('jcarousel-prev'));this.buttonNext=$('.jcarousel-next',this.container);if(this.buttonNext.size()==0&&this.options.buttonNextHTML!=null)
this.buttonNext=this.clip.before(this.options.buttonNextHTML).prev();this.buttonNext.addClass(this.className('jcarousel-next'));this.clip.addClass(this.className('jcarousel-clip'));this.list.addClass(this.className('jcarousel-list'));this.container.addClass(this.className('jcarousel-container'));var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var li=this.list.children('li');var self=this;if(li.size()>0){var wh=0,i=this.options.offset;li.each(function(){self.format(this,i++);wh+=self.dimension(this,di);});this.list.css(this.wh,wh+'px');if(!o||o.size===undefined)
this.options.size=li.size();}
this.container.css('display','block');this.buttonNext.css('display','block');this.buttonPrev.css('display','block');this.funcNext=function(){self.next();};this.funcPrev=function(){self.prev();};this.funcResize=function(){self.reload();};if(this.options.initCallback!=null)
this.options.initCallback(this,'init');if($.browser.safari && $.browser.version < 523){this.buttons(false,false);$(window).bind('load',function(){self.setup();});}else
this.setup();};var $jc=$.jcarousel;$jc.fn=$jc.prototype={jcarousel:'0.2.3'};$jc.fn.extend=$jc.extend=$.extend;$jc.fn.extend({setup:function(){this.first=null;this.last=null;this.prevFirst=null;this.prevLast=null;this.animating=false;this.timer=null;this.tail=null;this.inTail=false;if(this.locked)
return;this.list.css(this.lt,this.pos(this.options.offset)+'px');var p=this.pos(this.options.start);this.prevFirst=this.prevLast=null;this.animate(p,false);$(window).unbind('resize',this.funcResize).bind('resize',this.funcResize);},reset:function(){this.list.empty();this.list.css(this.lt,'0px');this.list.css(this.wh,'10px');if(this.options.initCallback!=null)
this.options.initCallback(this,'reset');this.setup();},reload:function(){if(this.tail!=null&&this.inTail)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+this.tail);this.tail=null;this.inTail=false;if(this.options.reloadCallback!=null)
this.options.reloadCallback(this);if(this.options.visible!=null){var self=this;var di=Math.ceil(this.clipping()/this.options.visible),wh=0,lt=0;$('li',this.list).each(function(i){wh+=self.dimension(this,di);if(i+1<self.first)
lt=wh;});this.list.css(this.wh,wh+'px');this.list.css(this.lt,-lt+'px');}
this.scroll(this.first,false);},lock:function(){this.locked=true;this.buttons();},unlock:function(){this.locked=false;this.buttons();},size:function(s){if(s!=undefined){this.options.size=s;if(!this.locked)
this.buttons();}
return this.options.size;},has:function(i,i2){if(i2==undefined||!i2)
i2=i;if(this.options.size!==null&&i2>this.options.size)
i2=this.options.size;for(var j=i;j<=i2;j++){var e=this.get(j);if(!e.length||e.hasClass('jcarousel-item-placeholder'))
return false;}
return true;},get:function(i){return $('.jcarousel-item-'+i,this.list);},add:function(i,s){var e=this.get(i),old=0,add=0;if(e.length==0){var c,e=this.create(i),j=$jc.intval(i);while(c=this.get(--j)){if(j<=0||c.length){j<=0?this.list.prepend(e):c.after(e);break;}}}else
old=this.dimension(e);e.removeClass(this.className('jcarousel-item-placeholder'));typeof s=='string'?e.html(s):e.empty().append(s);var di=this.options.visible!=null?Math.ceil(this.clipping()/this.options.visible):null;var wh=this.dimension(e,di)-old;if(i>0&&i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-wh+'px');this.list.css(this.wh,$jc.intval(this.list.css(this.wh))+wh+'px');return e;},remove:function(i){var e=this.get(i);if(!e.length||(i>=this.first&&i<=this.last))
return;var d=this.dimension(e);if(i<this.first)
this.list.css(this.lt,$jc.intval(this.list.css(this.lt))+d+'px');e.remove();this.list.css(this.wh,$jc.intval(this.list.css(this.wh))-d+'px');},next:function(){this.stopAuto();if(this.tail!=null&&!this.inTail)
this.scrollTail(false);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='last')&&this.options.size!=null&&this.last==this.options.size)?1:this.first+this.options.scroll);},prev:function(){this.stopAuto();if(this.tail!=null&&this.inTail)
this.scrollTail(true);else
this.scroll(((this.options.wrap=='both'||this.options.wrap=='first')&&this.options.size!=null&&this.first==1)?this.options.size:this.first-this.options.scroll);},scrollTail:function(b){if(this.locked||this.animating||!this.tail)
return;var pos=$jc.intval(this.list.css(this.lt));!b?pos-=this.tail:pos+=this.tail;this.inTail=!b;this.prevFirst=this.first;this.prevLast=this.last;this.animate(pos);},scroll:function(i,a){if(this.locked||this.animating)
return;this.animate(this.pos(i),a);},pos:function(i){if(this.locked||this.animating)
return;i=$jc.intval(i);if(this.options.wrap!='circular')
i=i<1?1:(this.options.size&&i>this.options.size?this.options.size:i);var back=this.first>i;var pos=$jc.intval(this.list.css(this.lt));var f=this.options.wrap!='circular'&&this.first<=1?1:this.first;var c=back?this.get(f):this.get(this.last);var j=back?f:f-1;var e=null,l=0,p=false,d=0;while(back?--j>=i:++j<i){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c[back?'before':'after'](e);}
c=e;d=this.dimension(e);if(p)
l+=d;if(this.first!=null&&(this.options.wrap=='circular'||(j>=1&&(this.options.size==null||j<=this.options.size))))
pos=back?pos+d:pos-d;}
var clipping=this.clipping();var cache=[];var visible=0,j=i,v=0;var c=this.get(i-1);while(++visible){e=this.get(j);p=!e.length;if(e.length==0){e=this.create(j).addClass(this.className('jcarousel-item-placeholder'));c.length==0?this.list.prepend(e):c[back?'before':'after'](e);}
c=e;var d=this.dimension(e);if(d==0){return 0;}
if(this.options.wrap!='circular'&&this.options.size!==null&&j>this.options.size)
cache.push(e);else if(p)
l+=d;v+=d;if(v>=clipping)
break;j++;}
for(var x=0;x<cache.length;x++)
cache[x].remove();if(l>0){this.list.css(this.wh,this.dimension(this.list)+l+'px');if(back){pos-=l;this.list.css(this.lt,$jc.intval(this.list.css(this.lt))-l+'px');}}
var last=i+visible-1;if(this.options.wrap!='circular'&&this.options.size&&last>this.options.size)
last=this.options.size;if(j>last){visible=0,j=last,v=0;while(++visible){var e=this.get(j--);if(!e.length)
break;v+=this.dimension(e);if(v>=clipping)
break;}}
var first=last-visible+1;if(this.options.wrap!='circular'&&first<1)
first=1;if(this.inTail&&back){pos+=this.tail;this.inTail=false;}
this.tail=null;if(this.options.wrap!='circular'&&last==this.options.size&&(last-visible+1)>=1){var m=$jc.margin(this.get(last),!this.options.vertical?'marginRight':'marginBottom');if((v-m)>clipping)
this.tail=v-clipping-m;}
while(i-->first)
pos+=this.dimension(this.get(i));this.prevFirst=this.first;this.prevLast=this.last;this.first=first;this.last=last;return pos;},animate:function(p,a){if(this.locked||this.animating)
return;this.animating=true;var self=this;var scrolled=function(){self.animating=false;if(p==0)
self.list.css(self.lt,0);if(self.options.wrap=='both'||self.options.wrap=='last'||self.options.size==null||self.last<self.options.size)
self.startAuto();self.buttons();self.notify('onAfterAnimation');};this.notify('onBeforeAnimation');if(!this.options.animation||a==false){this.list.css(this.lt,p+'px');scrolled();}else{var o=!this.options.vertical?{'left':p}:{'top':p};this.list.animate(o,this.options.animation,this.options.easing,scrolled);}},startAuto:function(s){if(s!=undefined)
this.options.auto=s;if(this.options.auto==0)
return this.stopAuto();if(this.timer!=null)
return;var self=this;this.timer=setTimeout(function(){self.next();},this.options.auto*1000);},stopAuto:function(){if(this.timer==null)
return;clearTimeout(this.timer);this.timer=null;},buttons:function(n,p){if(n==undefined||n==null){var n=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='first')||this.options.size==null||this.last<this.options.size);if(!this.locked&&(!this.options.wrap||this.options.wrap=='first')&&this.options.size!=null&&this.last>=this.options.size)
n=this.tail!=null&&!this.inTail;}
if(p==undefined||p==null){var p=!this.locked&&this.options.size!==0&&((this.options.wrap&&this.options.wrap!='last')||this.first>1);if(!this.locked&&(!this.options.wrap||this.options.wrap=='last')&&this.options.size!=null&&this.first==1)
p=this.tail!=null&&this.inTail;}
var self=this;this.buttonNext[n?'bind':'unbind'](this.options.buttonNextEvent,this.funcNext)[n?'removeClass':'addClass'](this.className('jcarousel-next-disabled')).attr('disabled',n?false:true);this.buttonPrev[p?'bind':'unbind'](this.options.buttonPrevEvent,this.funcPrev)[p?'removeClass':'addClass'](this.className('jcarousel-prev-disabled')).attr('disabled',p?false:true);if(this.buttonNext.length>0&&(this.buttonNext[0].jcarouselstate==undefined||this.buttonNext[0].jcarouselstate!=n)&&this.options.buttonNextCallback!=null){this.buttonNext.each(function(){self.options.buttonNextCallback(self,this,n);});this.buttonNext[0].jcarouselstate=n;}
if(this.buttonPrev.length>0&&(this.buttonPrev[0].jcarouselstate==undefined||this.buttonPrev[0].jcarouselstate!=p)&&this.options.buttonPrevCallback!=null){this.buttonPrev.each(function(){self.options.buttonPrevCallback(self,this,p);});this.buttonPrev[0].jcarouselstate=p;}},notify:function(evt){var state=this.prevFirst==null?'init':(this.prevFirst<this.first?'next':'prev');this.callback('itemLoadCallback',evt,state);if(this.prevFirst!==this.first){this.callback('itemFirstInCallback',evt,state,this.first);this.callback('itemFirstOutCallback',evt,state,this.prevFirst);}
if(this.prevLast!==this.last){this.callback('itemLastInCallback',evt,state,this.last);this.callback('itemLastOutCallback',evt,state,this.prevLast);}
this.callback('itemVisibleInCallback',evt,state,this.first,this.last,this.prevFirst,this.prevLast);this.callback('itemVisibleOutCallback',evt,state,this.prevFirst,this.prevLast,this.first,this.last);},callback:function(cb,evt,state,i1,i2,i3,i4){if(this.options[cb]==undefined||(typeof this.options[cb]!='object'&&evt!='onAfterAnimation'))
return;var callback=typeof this.options[cb]=='object'?this.options[cb][evt]:this.options[cb];if(!$.isFunction(callback))
return;var self=this;if(i1===undefined)
callback(self,state,evt);else if(i2===undefined)
this.get(i1).each(function(){callback(self,this,i1,state,evt);});else{for(var i=i1;i<=i2;i++)
if(i!==null&&!(i>=i3&&i<=i4))
this.get(i).each(function(){callback(self,this,i,state,evt);});}},create:function(i){return this.format('<li></li>',i);},format:function(e,i){var $e=$(e).addClass(this.className('jcarousel-item')).addClass(this.className('jcarousel-item-'+i));$e.attr('jcarouselindex',i);return $e;},className:function(c){return c+' '+c+(!this.options.vertical?'-horizontal':'-vertical');},dimension:function(e,d){var el=e.jquery!=undefined?e[0]:e;var old=!this.options.vertical?el.offsetWidth+$jc.margin(el,'marginLeft')+$jc.margin(el,'marginRight'):el.offsetHeight+$jc.margin(el,'marginTop')+$jc.margin(el,'marginBottom');if(d==undefined||old==d)
return old;var w=!this.options.vertical?d-$jc.margin(el,'marginLeft')-$jc.margin(el,'marginRight'):d-$jc.margin(el,'marginTop')-$jc.margin(el,'marginBottom');$(el).css(this.wh,w+'px');return this.dimension(el);},clipping:function(){return!this.options.vertical?this.clip[0].offsetWidth-$jc.intval(this.clip.css('borderLeftWidth'))-$jc.intval(this.clip.css('borderRightWidth')):this.clip[0].offsetHeight-$jc.intval(this.clip.css('borderTopWidth'))-$jc.intval(this.clip.css('borderBottomWidth'));},index:function(i,s){if(s==undefined)
s=this.options.size;return Math.round((((i-1)/s)-Math.floor((i-1)/s))*s)+1;}});$jc.extend({defaults:function(d){return $.extend(defaults,d||{});},margin:function(e,p){if(!e)
return 0;var el=e.jquery!=undefined?e[0]:e;if(p=='marginRight'&&$.browser.safari){var old={'display':'block','float':'none','width':'auto'},oWidth,oWidth2;$.swap(el,old,function(){oWidth=el.offsetWidth;});old['marginRight']=0;$.swap(el,old,function(){oWidth2=el.offsetWidth;});return oWidth2-oWidth;}
return $jc.intval($.css(el,p));},intval:function(v){v=parseInt(v);return isNaN(v)?0:v;}});})(jQuery);function archives(){$j('#plans').hide();$j('#outils_s').hide();$j('#forum_archives').show();$j('#actualites_archives').hide();}
function plan(){$j('#plans').show();$j('#forum_archives').hide();$j('#outils_s').hide();$j('#actualites_archives').hide();}
function outils(){$j('#plans').hide();$j('#forum_archives').hide();$j('#actualites_archives').hide();$j('#outils_s').show();}
function actualites(){$j('#plans').hide();$j('#outils_s').hide();$j('#forum_archives').hide();$j('#actualites_archives').show();}
function contactPub(){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.post("/home/callformpubcontact",{type:"pub"},function(a){position();$j("#dialog2").html(a);});}
function contactRed(){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.post("/home/callformredaction",{type:"redaction"},function(a){position();$j("#dialog2").html(a);});}
function pageContenu(id){WaitingContact();$j("html, body").animate({scrollTop:0},"slow");$j.post("/pages/display",{id:id},function(a){if(id==28^id==30){recalculatePosition("#dialog2",425,200);}else{recalculatePosition("#dialog2",425,560);}
$j("#dialog2").html(a);});}
var second=0;var ntime=0;var tr='';function inscrement(){second++;if(second==ntime){clearTimeout(tr);close_increment();}else{tr=setTimeout("inscrement()",1000);}}
function closeMaskIntersticiel(){$j("#mask").fadeOut();$j("#mask").css({background:"white"});}
function openMaskIntersticiel(){var a=$j(document).height(),b=$j(window).width();$j("#mask").css({width:b,height:a,background:"#cecece"});$j("#mask").fadeIn(0);$j("#mask").fadeTo("fast",0.5);}
function close_increment(){clearTimeout(tr);$j("#intersticiel").hide();closeMaskIntersticiel();}
(function($){$.dimensions={version:'1.2'};$.each(['Height','Width'],function(i,name){$.fn['inner'+name]=function(){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';return this.is(':visible')?this[0]['client'+name]:num(this,name.toLowerCase())+num(this,'padding'+torl)+num(this,'padding'+borr);};$.fn['outer'+name]=function(options){if(!this[0])return;var torl=name=='Height'?'Top':'Left',borr=name=='Height'?'Bottom':'Right';options=$.extend({margin:false},options||{});var val=this.is(':visible')?this[0]['offset'+name]:num(this,name.toLowerCase())+num(this,'border'+torl+'Width')+num(this,'border'+borr+'Width')+num(this,'padding'+torl)+num(this,'padding'+borr);return val+(options.margin?(num(this,'margin'+torl)+num(this,'margin'+borr)):0);};});$.each(['Left','Top'],function(i,name){$.fn['scroll'+name]=function(val){if(!this[0])return;return val!=undefined?this.each(function(){this==window||this==document?window.scrollTo(name=='Left'?val:$(window)['scrollLeft'](),name=='Top'?val:$(window)['scrollTop']()):this['scroll'+name]=val;}):this[0]==window||this[0]==document?self[(name=='Left'?'pageXOffset':'pageYOffset')]||$.boxModel&&document.documentElement['scroll'+name]||document.body['scroll'+name]:this[0]['scroll'+name];};});$.fn.extend({position:function(){var left=0,top=0,elem=this[0],offset,parentOffset,offsetParent,results;if(elem){offsetParent=this.offsetParent();offset=this.offset();parentOffset=offsetParent.offset();offset.top-=num(elem,'marginTop');offset.left-=num(elem,'marginLeft');parentOffset.top+=num(offsetParent,'borderTopWidth');parentOffset.left+=num(offsetParent,'borderLeftWidth');results={top:offset.top-parentOffset.top,left:offset.left-parentOffset.left};}return results;},offsetParent:function(){var offsetParent=this[0].offsetParent;while(offsetParent&&(!/^body|html$/i.test(offsetParent.tagName)&&$.css(offsetParent,'position')=='static'))offsetParent=offsetParent.offsetParent;return $(offsetParent);}});function num(el,prop){return parseInt($.curCSS(el.jquery?el[0]:el,prop,true))||0;};})(jQuery);
function openIntersticiel(html,ktime,mask){if(ktime==undefined){ntime=10;}else{ntime=ktime;}
if(undefined==mask){mask=true;}
second=0;$j("#intersticiel").html('<div id="corps_intersticiel" style="background:none;"><div style="float:left;clear:both;">'+html+'</div></div>').show();$j("#corps_intersticiel").append('<div id="close" style="padding-top:5px; padding-bottom:5px;padding-right:0px;width:100%;background:white; clear:both; text-align:right;"><span style="display:inline; padding-right:10px;"><a style="color:black;" href="javascript://" onclick="close_increment()">Revenir sur Yabiladi.com</a></span></div>').show();widths=$j("#intersticiel").innerWidth()-40;heights=$j("#intersticiel").innerHeight()-40;recalculatePosition("#intersticiel",widths,heights);inscrement(mask);if(mask==true){openMaskIntersticiel();}
document.onkeydown=function(e){if(e==null){keycode=event.keyCode;}else{keycode=e.which;}
if(keycode==27){close_increment();}}}
(function(b){b.jScrollPane={active:[]};b.fn.jScrollPane=function(c){c=b.extend({},b.fn.jScrollPane.defaults,c);var n=function(){return false};return this.each(function(){var d=b(this),Q=this,R=0,l,f,q,K=c.topCapHeight,g;if(b(this).parent().is(".jScrollPaneContainer")){g=b(this).parent();R=c.maintainPosition?d.position().top:0;var i=b(this).parent();l=i.innerWidth();f=i.outerHeight();b(">.jScrollPaneTrack, >.jScrollArrowUp, >.jScrollArrowDown, >.jScrollCap",i).remove();d.css({top:0})}else{d.data("originalStyleTag",d.attr("style"));d.css("overflow","hidden");this.originalPadding=d.css("paddingTop")+" "+d.css("paddingRight")+" "+d.css("paddingBottom")+" "+d.css("paddingLeft");this.originalSidePaddingTotal=(parseInt(d.css("paddingLeft"))||0)+(parseInt(d.css("paddingRight"))||0);l=d.innerWidth();f=d.innerHeight();g=b("<div></div>").attr({className:"jScrollPaneContainer"}).css({height:f+6+"px",width:l+"px"});c.enableKeyboardNavigation&&g.attr("tabindex",c.tabIndex);d.wrap(g);g=d.parent();b(document).bind("emchange",function(){d.jScrollPane(c)})}q=f;if(c.reinitialiseOnImageLoad){var v=b.data(Q,"jScrollPaneImagesToLoad")||b("img",d),S=[];v.length&&v.each(function(a,e){b(this).bind("load readystatechange",function(){if(b.inArray(a,S)==-1){S.push(e);v=b.grep(v,function(k){return k!=e});b.data(Q,"jScrollPaneImagesToLoad",v);var h=b.extend(c,{reinitialiseOnImageLoad:false});d.jScrollPane(h)}}).each(function(){if(this.complete||this.complete===undefined)this.src=this.src})})}i={height:"auto",width:l-c.scrollbarWidth-c.scrollbarMargin-this.originalSidePaddingTotal+"px"};if(c.scrollbarOnLeft)i.paddingLeft=c.scrollbarMargin+c.scrollbarWidth+"px";else i.paddingRight=c.scrollbarMargin+"px";d.css(i);var w=d.outerHeight(),z=f/w;i=z<0.99;g[i?"addClass":"removeClass"]("jScrollPaneScrollable");if(i){g.append(b("<div></div>").addClass("jScrollCap jScrollCapTop").css({height:c.topCapHeight}),b("<div></div>").attr({className:"jScrollPaneTrack"}).css({width:c.scrollbarWidth+"px"}).append(b("<div></div>").attr({className:"jScrollPaneDrag"}).css({width:c.scrollbarWidth+"px"}).append(b("<div></div>").attr({className:"jScrollPaneDragTop"}).css({width:c.scrollbarWidth+"px"}),b("<div></div>").attr({className:"jScrollPaneDragBottom"}).css({width:c.scrollbarWidth+"px"}))),b("<div></div>").addClass("jScrollCap jScrollCapBottom").css({height:c.bottomCapHeight}));l=b(">.jScrollPaneTrack",g);var A=b(">.jScrollPaneTrack .jScrollPaneDrag",g),x,r=[],s,t=function(){if(s>4||s%4==0)o(j+x*L);s++};c.enableKeyboardNavigation&&g.bind("keydown.jscrollpane",function(a){switch(a.keyCode){case 38:x=-1;s=0;t();r[r.length]=setInterval(t,100);return false;case 40:x=1;s=0;t();r[r.length]=setInterval(t,100);return false;case 33:case 34:return false;default:}}).bind("keyup.jscrollpane",function(a){if(a.keyCode==38||a.keyCode==40){for(a=0;a<r.length;a++)clearInterval(r[a]);return false}});if(c.showArrows){var B,T,U=function(){b("html").unbind("mouseup",U);B.removeClass("jScrollActiveArrowButton");clearInterval(T)},V=function(){b("html").bind("mouseup",U);B.addClass("jScrollActiveArrowButton");s=0;t();T=setInterval(t,100)};g.append(b("<a></a>").attr({href:"javascript:;",className:"jScrollArrowUp",tabindex:-1}).css({width:c.scrollbarWidth+"px",top:c.topCapHeight+"px"}).html("Scroll up").bind("mousedown",function(){B=b(this);x=-1;V();this.blur();return false}).bind("click",n),b("<a></a>").attr({href:"javascript:;",className:"jScrollArrowDown",tabindex:-1}).css({width:c.scrollbarWidth+"px",bottom:c.bottomCapHeight+"px"}).html("Scroll down").bind("mousedown",function(){B=b(this);x=1;V();this.blur();return false}).bind("click",n));var M=b(">.jScrollArrowUp",g),W=b(">.jScrollArrowDown",g)}if(c.arrowSize){q=f-c.arrowSize-c.arrowSize;K+=c.arrowSize}else if(M){i=M.height();c.arrowSize=i;q=f-i-W.height();K+=i}q-=c.topCapHeight+c.bottomCapHeight;l.css({height:q+"px",top:K+"px"});var N=b(this).css({position:"absolute",overflow:"visible"}),y,p,L,j=0,C=z*f/2,D=function(a,e){var h=e=="X"?"Left":"Top";return a["page"+e]||a["client"+e]+(document.documentElement["scroll"+h]||document.body["scroll"+h])||0},E=function(){return false},G=function(){F();y=A.offset(false);y.top-=j;p=q-A[0].offsetHeight;L=2*c.wheelSpeed*p/w},X=function(){b("html").unbind("mouseup",X).unbind("mousemove",Y);C=z*f/2;b.browser.msie&&b("html").unbind("dragstart",E).unbind("selectstart",E)},o=function(a){g.scrollTop(0);j=a=a<0?0:a>p?p:a;A.css({top:a+"px"});var e=a/p;d.data("jScrollPanePosition",(f-w)*-e);N.css({top:(f-w)*e+"px"});d.trigger("scroll");if(c.showArrows){M[a==0?"addClass":"removeClass"]("disabled");W[a==p?"addClass":"removeClass"]("disabled")}},Y=function(a){o(D(a,"Y")-y.top-C)};A.css({height:Math.max(Math.min(z*(f-c.arrowSize*2),c.dragMaxHeight),c.dragMinHeight)+"px"}).bind("mousedown",function(a){G();C=D(a,"Y")-j-y.top;b("html").bind("mouseup",X).bind("mousemove",Y);b.browser.msie&&b("html").bind("dragstart",E).bind("selectstart",E);return false});var Z,H,$,aa=function(){if(H>8||H%4==0)o(j-(j-$)/2);H++},ba=function(){clearInterval(Z);b("html").unbind("mouseup",ba).unbind("mousemove",O)},O=function(a){$=D(a,"Y")-y.top-C};l.bind("mousedown",function(a){G();O(a);H=0;b("html").bind("mouseup",ba).bind("mousemove",O);Z=setInterval(aa,100);aa();return false});g.bind("mousewheel",function(a,e){e=e||(a.wheelDelta?a.wheelDelta/120:a.detail?-a.detail/3:0);G();F();var h=j;o(j-e*L);return h==j});var I,P,ca=function(){var a=(I-j)/c.animateStep;if(a>1||a<-1)o(j+a);else{o(I);F()}},F=function(){if(P){clearInterval(P);delete I}},u=function(a,e){if(typeof a=="string"){try{$e=b(a,d)}catch(h){return}if(!$e.length)return;a=$e.offset().top-d.offset().top}F();var k=w-f;a=a>k?k:a;d.data("jScrollPaneMaxScroll",k);k=a/k*p;if(e||!c.animateTo)o(k);else{g.scrollTop(0);I=k;P=setInterval(ca,c.animateInterval)}};d[0].scrollTo=u;d[0].scrollBy=function(a){var e=-parseInt(N.css("top"))||0;u(e+a)};G();u(-R,true);b("*",this).bind("focus",function(){for(var a=b(this),e=0;a[0]!=d[0];){e+=a.position().top;a=a.offsetParent()}a=-parseInt(N.css("top"))||0;var h=a+f;if(!(e>a&&e<h)){h=e-c.scrollbarMargin;if(e>a)h+=b(this).height()+15+c.scrollbarMargin-f;u(h)}});if(c.observeHash){if(location.hash&&location.hash.length>1)setTimeout(function(){u(location.hash)},b.browser.safari?100:0);b(document).bind("click",function(a){$target=b(a.target);if($target.is("a")){var e=$target.attr("href");if(e&&e.substr(0,1)=="#"&&e.length>1)setTimeout(function(){u(e,!c.animateToInternalLinks)},b.browser.safari?100:0)}})}var J,m,da=function(){direction=J<0?-1:1;d[0].scrollBy(J/2)},ea=function(a){var e=d.parent().offset().top,h=e+f;a=D(a,"Y");J=a<e?a-e:a>h?a-h:0;if(J==0){if(m){clearInterval(m);m=undefined}}else m||(m=setInterval(da,100))},fa=function(){b(document).unbind("mousemove.jScrollPaneDragging").unbind("mouseup.jScrollPaneDragging");if(m){clearInterval(m);m=undefined}};g.bind("mousedown.jScrollPane",function(){b(document).bind("mousemove.jScrollPaneDragging",ea);b(document).bind("mouseup.jScrollPaneDragging",fa)});b.jScrollPane.active.push(d[0])}else{d.css({height:f+"px",width:l-this.originalSidePaddingTotal+"px",padding:this.originalPadding});d[0].scrollTo=d[0].scrollBy=function(){};d.parent().unbind("mousewheel").unbind("mousedown.jScrollPane").unbind("keydown.jscrollpane").unbind("keyup.jscrollpane")}})};b.fn.jScrollPaneRemove=function(){b(this).each(function(){$this=b(this);var c=$this.parent();if(c.is(".jScrollPaneContainer")){$this.css({top:"",height:"",width:"",padding:"",overflow:"",position:""});$this.attr("style",$this.data("originalStyleTag"));c.after($this).remove()}})};b.fn.jScrollPane.defaults={scrollbarWidth:10,scrollbarMargin:5,wheelSpeed:18,showArrows:false,arrowSize:0,animateTo:false,dragMinHeight:1,dragMaxHeight:99999,animateInterval:100,animateStep:3,maintainPosition:true,scrollbarOnLeft:false,reinitialiseOnImageLoad:false,tabIndex:0,enableKeyboardNavigation:true,animateToInternalLinks:false,topCapHeight:0,bottomCapHeight:0,observeHash:true};b(window).bind("unload",function(){for(var c=b.jScrollPane.active,n=0;n<c.length;n++)c[n].scrollTo=c[n].scrollBy=null})})(jQuery);

//
(function($) {
	var nbr = 0;
	$.hrzAccordion = {
       
	   
	   setOnEvent: function(i, container, finalWidth, settings){
		
		$("#"+container+"Handle"+i).bind("mouseover",function() {			 
  			 
			var status = $('[rel='+container+'ContainerSelected]').data('status');
			
			if(status ==1 && settings.eventWaitForAnim === true){
			 return false;	
			}
			
			if( $("#"+container+"Handle"+i).attr("rel") != container+"HandleSelected"){
    		
			  settings.eventAction;
				
				$('[id*='+container+'Handle]').attr("rel","");
				
				$('[id*='+container+'Handle]').attr("class",settings.handleClass);

   				$("#"+container+"Handle"+i).addClass(settings.handleClassSelected);
							   
   		
				$("."+settings.contentWrapper).css({width: finalWidth+"px" });
				
				switch(settings.closeOpenAnimation)
				{
				case 1:

	   
			if($('[rel='+container+'ContainerSelected]').get(0)  ){
			$('[rel='+container+'ContainerSelected]').data('status',1);
				
				//current_width = $('[rel='+container+'ContainerSelected]').width();
				
				$('[rel='+container+'ContainerSelected]').animate({width: "0px",opacity:"1"}, { queue:true, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){	
	 																																	
				$('[rel='+container+'ContainerSelected]').data('status',0);																																											} ,step: function(now){
																																															 							width = $(this).width();
			
				//new_width = finalWidth- (finalWidth  * (width/current_width));
				new_width = finalWidth - width;
				$('#'+container+'Content'+i).width(Math.ceil(new_width)).css("opacity","1");
				
				}});

			}else{
				$('[rel='+container+'ContainerSelected]').data('status',1);
					
				$('#'+container+'Content'+i).animate({width: finalWidth,opacity:"1"}, { queue:false, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){
																																														  $('[rel='+container+'ContainerSelected]').data('status',0);	
																																														  }});
				
					
				}
				
				break;
				case 2:
					$('[id*='+container+'Content]').css({width: "0px"});
					$('#'+container+'Content'+i).animate({width: finalWidth+"px",opacity:"1"}, { queue:false, duration:settings.openSpeed ,easing:settings.openEaseAction, complete: 
settings.completeAction																																																									});						
				
				break;
				}

				$('[id*='+container+'Content]').attr("rel","");			
				$("#"+container+"Handle"+i).attr("rel",container+"HandleSelected");
				$("#"+container+"Content"+i).attr("rel",container+"ContainerSelected");					
				
			
			}
			
		});	
			////////////////////////////////////////////////////////////////////
			$("#"+container+"Handle"+i).bind(settings.eventTrigger,function() {			 
			   			 
						var status = $('[rel='+container+'ContainerSelected]').data('status');
						if(navigation == "AJAX") {
							if(langue != "es") {
								tab = settings.links.split(",");
								var hash = tab[i].replace(/^.*#histo#/, '');
								menuid = i;
								$j.historyLoad(hash);
							}
						} 
						if(status ==1 && settings.eventWaitForAnim === true){
						 return false;	
						}
						
						if( $("#"+container+"Handle"+i).attr("rel") != container+"HandleSelected"){
			    		
						  settings.eventAction;
							
							$('[id*='+container+'Handle]').attr("rel","");
							
							$('[id*='+container+'Handle]').attr("class",settings.handleClass);
		
			   				$("#"+container+"Handle"+i).addClass(settings.handleClassSelected);
										   
			   		
							$("."+settings.contentWrapper).css({width: finalWidth+"px" });
							
							switch(settings.closeOpenAnimation)
							{
							case 1:
      
				   
						if($('[rel='+container+'ContainerSelected]').get(0)  ){
						$('[rel='+container+'ContainerSelected]').data('status',1);
							
							//current_width = $('[rel='+container+'ContainerSelected]').width();
							
							$('[rel='+container+'ContainerSelected]').animate({width: "0px",opacity:"1"}, { queue:true, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){	
				 																																	
							$('[rel='+container+'ContainerSelected]').data('status',0);																																											} ,step: function(now){
																																																		 							width = $(this).width();
						
							//new_width = finalWidth- (finalWidth  * (width/current_width));
							new_width = finalWidth - width;
							$('#'+container+'Content'+i).width(Math.ceil(new_width)).css("opacity","1");
							
							}});
		
						}else{
							$('[rel='+container+'ContainerSelected]').data('status',1);
								
							$('#'+container+'Content'+i).animate({width: finalWidth,opacity:"1"}, { queue:false, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){
																																																	  $('[rel='+container+'ContainerSelected]').data('status',0);	
																																																	  }});
							
								
							}
							
							break;
							case 2:
								$('[id*='+container+'Content]').css({width: "0px"});
								$('#'+container+'Content'+i).animate({width: finalWidth+"px",opacity:"1"}, { queue:false, duration:settings.openSpeed ,easing:settings.openEaseAction, complete: 
 settings.completeAction																																																									});						
							
							break;
							}

							$('[id*='+container+'Content]').attr("rel","");			
							$("#"+container+"Handle"+i).attr("rel",container+"HandleSelected");
							$("#"+container+"Content"+i).attr("rel",container+"ContainerSelected");					
							
						
						}
						
					});	
			
}
	    };
	
	$.fn.extend({
	   
		hrzAccordionLoop: function(options) {
			return this.each(function(a){  
				
				var container = $(this).attr("id") || $(this).attr("class");
				var elementCount = $('#'+container+' > li, .'+container+' > li').size();
				var settings = $(this).data('settings');
				
				variable_holder="interval"+container ;
				var i =0;
				var loopStatus  = "start";
				
				variable_holder = window.setInterval(function(){							
				
				$("#"+container+"Handle"+i).trigger(settings.eventTrigger);
				
				if(loopStatus =="start"){
						i = i + 1;
					}else{
						i = i-1;	
					}
					
					if(i==elementCount && loopStatus  == "start"){
						loopStatus  = "end";
						i=elementCount-1;

					}
					
					if(i==0 && loopStatus  == "end"){
						loopStatus  = "start";
						i=0;

					}
												},settings.cycleInterval);
				
				
				});
			},
		hrzAccordion: function(options) {
			this.settings = {
			langue					: "fr",
			links					: "/home/,/communaute/,/home/,/home/,/voyage/",
			eventTrigger	   		: "click",
			navigation				: "HTML",
			containerClass     		: "container",
			listItemClass      		: "listItem",					
			contentContainerClass  	: "contentContainer",
			contentWrapper     		: "contentWrapper",
			contentInnerWrapper		: "contentInnerWrapper",
			handleClass        		: "handle",
			handleClassOver    		: "handleOver",
			handleClassSelected		: "handleSelected",
			handlePosition     		: "right",
			handlePositionArray		: "", // left,left,right,right,right
			closeEaseAction    		: "swing",
			closeSpeed     			: 1,
			openEaseAction     		: "swing",
			openSpeed      			: 1,
			openOnLoad		   		: 2,
			hashPrefix		   		: "tab",
			eventAction		   		: function(){
								 	
								 	},
			completeAction	   		: function(){
								 	//add your own onComplete function here
								 		
								 	},
			closeOpenAnimation 		: 1,// 1 - open and close at the same time / 2- close all and than open next
			cycle			   		: false, // not integrated yet, will allow to cycle through tabs by interval
			cycleInterval	   		: 10000,
			fixedWidth				: "380",
			eventWaitForAnim		: true
				
		};
	
		if(options){
			$.extend(this.settings, options);
		}
			var settings = this.settings;
			
			
			
			return this.each(function(a){    		
				
				var container = $(this).attr("id") || $(this).attr("class");			
				
				$(this).data('settings', settings);
				
				$(this).wrap("<div class='"+settings.containerClass+"'></div>");
			
				var elementCount = $('#'+container+' > li, .'+container+' > li').size();
												
				var containerWidth =  $("."+settings.containerClass).width();
				
				var handleWidth = $("."+settings.handleClass).css("width");
		
				handleWidth =  handleWidth.replace(/px/,"");
			    var finalWidth;
				var handle;
				
				if(settings.fixedWidth){
					finalWidth = settings.fixedWidth;
				}else{
					finalWidth = containerWidth-(elementCount*handleWidth)-handleWidth;
				}
				
				$('#'+container+' > li, .'+container+' > li').each(function(i) {
			
					$(this).attr('id', container+"ListItem"+i);
			   		$(this).attr('class',settings.listItemClass);
		       		$(this).html("<div class='"+settings.contentContainerClass+"' id='"+container+"Content"+i+"'>"
								 +"<div class=\""+settings.contentWrapper+"\">"
								 +"<div class=\""+settings.contentInnerWrapper+"\">"
								 +$(this).html()
								 +"</div></div></div>");
			   		
					if($("div",this).hasClass(settings.handleClass)){
					
					var html = $("div."+settings.handleClass,this).attr("id",""+container+"Handle"+i+"").html();
					$("div."+settings.handleClass,this).remove();
					
					 handle = "<div class=\""+settings.handleClass+"\" id='"+container+"Handle"+i+"'>"+html+"</div>";
					}else{
					 handle = "<div class=\""+settings.handleClass+"\" id='"+container+"Handle"+i+"'></div>";
					}
					
				
					
					if(settings.handlePositionArray){
						splitthis 				= settings.handlePositionArray.split(",");
						settings.handlePosition = splitthis[i];
					}
					
					switch(settings.handlePosition ){
						case "left":
						$(this).prepend( handle );
						break;
						case "right":	
						$(this).append( handle );	
						break;
						case "top":	
						$("."+container+"Top").append( handle );	
						break;
						case "bottom":	
						$("."+container+"Bottom").append( handle );	
						break;
					}					
				
					$("#"+container+"Handle"+i).bind("mouseover", function(){
						if(langue == "ar") {
							if(i == 3) {
								if(!document.getElementById("endf")) {
									//$("#menusListItem3").append('<div class="endf" id="endf"><img src="http://i.ycdn.org/images/arabe/end_flesh2.png"></div>');
									
								} else {
									$("#endf").show();
									
								}
							} else {
								$("#endf").hide();
								
							}
						} else {
							if(i == 4) {
								if(!document.getElementById("endf")) {
									$("#menusListItem4").append('<div class="endf" id="endf"><img src="http://i.ycdn.org/images/end_flesh2.png"></div>');
								} else {
									$("#endf").show();
								}
							} else {
								$("#endf").hide();
							}
						}
						$("#"+container+"Handle"+i).addClass(settings.handleClassOver);
					});
					
				
					$("#"+container+"Handle"+i).bind("mouseout", function(){
						if( $("#"+container+"Handle"+i).attr("rel") != "selected"){
							$("#"+container+"Handle"+i).removeClass(settings.handleClassOver);
						}
					});
					
				
					$.hrzAccordion.setOnEvent(i, container, finalWidth, settings);				
					
					if(i == elementCount-1){
						$('#'+container+",."+container).show();
					}
					
					
					if(i == elementCount) {
						//$('.menus').append('<div class="last_flesh"><img src="/images/last_flech.png"/></div>');
					} else {
						$('.last_flesh').html('');
					}	
					if(settings.openOnLoad !== false && i == elementCount-1){
							var location_hash = location.hash;
							location_hash  = location_hash.replace("#", "");	
							if(location_hash.search(settings.hashPrefix) != '-1' ){
							var tab = 1;
							location_hash  = location_hash.replace(settings.hashPrefix, "");
							}
							
							if(location_hash && tab ==1){
						 		$("#"+container+"Handle"+(location_hash)).attr("rel",container+"HandleSelected");
								$("#"+container+"Content"+(location_hash)).attr("rel",container+"ContainerSelected");		
								$("#"+container+"Handle"+(location_hash-1)).trigger(settings.eventTrigger);
												
							}else{
								
								$("#"+container+"Handle"+(settings.openOnLoad)).attr("rel",container+"HandleSelected");
							    $("#"+container+"Content"+(settings.openOnLoad)).attr("rel",container+"ContainerSelected");	
								//$("#"+container+"Handle"+(settings.openOnLoad-1)).trigger(settings.eventTrigger);
								
								
								////////////////////////
								var status = $('[rel='+container+'ContainerSelected]').data('status');
							
								if(status ==1 && settings.eventWaitForAnim === true){
								 return false;	
								}
								
								if( $("#"+container+"Handle"+settings.openOnLoad-1).attr("rel") != container+"HandleSelected"){
					    		
								  settings.eventAction;
									
									$('[id*='+container+'Handle]').attr("rel","");
									
									$('[id*='+container+'Handle]').attr("class",settings.handleClass);
				
					   				$("#"+container+"Handle"+settings.openOnLoad-1).addClass(settings.handleClassSelected);
												   
					   		
									$("."+settings.contentWrapper).css({width: finalWidth+"px" });
									
									switch(settings.closeOpenAnimation)
									{
									case 1:
		      
						   
								if($('[rel='+container+'ContainerSelected]').get(0)  ){
								$('[rel='+container+'ContainerSelected]').data('status',1);
								
									//current_width = $('[rel='+container+'ContainerSelected]').width();
									
									$('[rel='+container+'ContainerSelected]').animate({width: "0px",opacity:"1"}, { queue:true, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){	
						 																																	
									$('[rel='+container+'ContainerSelected]').data('status',0);																																											} ,step: function(now){
																																																				 							width = $(this).width();
								
									//new_width = finalWidth- (finalWidth  * (width/current_width));
									new_width = finalWidth - width;
									$('#'+container+'Content'+(settings.openOnLoad-1)).width(Math.ceil(new_width)).css("opacity","1");
									
									}});
				
								}else{
									
									$('[rel='+container+'ContainerSelected]').data('status',1);
										
									$('#'+container+'Content'+(settings.openOnLoad-1)).animate({width: finalWidth,opacity:"1"}, { queue:false, duration:settings.closeSpeed ,easing:settings.closeEaseAction,complete: function(){
																																																			  $('[rel='+container+'ContainerSelected]').data('status',0);	
																																																			  }});
									
										
									}
									
									break;
									case 2:
										$('[id*='+container+'Content]').css({width: "0px"});
										$('#'+container+'Content'+(settings.openOnLoad-1)).animate({width: finalWidth+"px",opacity:"1"}, { queue:false, duration:settings.openSpeed ,easing:settings.openEaseAction, complete: 
		 settings.completeAction		
		 });						
									
									break;
									}

									$('[id*='+container+'Content]').attr("rel","");			
									$("#"+container+"Handle"+(settings.openOnLoad-1)).attr("rel",container+"HandleSelected");
									$("#"+container+"Content"+(settings.openOnLoad-1)).attr("rel",container+"ContainerSelected");					
									
								
								}
								////////////////////////
							}					
					} 
				});	
				
				if(settings.cycle === true){
					$(this).hrzAccordionLoop();
					
				}
			});		
			
		}		
	});
	
}

)(jQuery);	

//
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('r.E.W=7(c,d){c=c||".";d=q d=="7"?d:7(){};6.K(7(e){g a=e.i?e.i:e.h?e.h:0;2(a==k&&6.N.J()=="G"){5 3}f 2(a==k){5 j}g b=j;2((e.4&&a==y)||(e.4&&a==v))5 3;2((e.4&&a==t)||(e.4&&a==u))5 3;2((e.4&&a==V)||(e.4&&a==S))5 3;2((e.4&&a==R)||(e.4&&a==Q))5 3;2((e.4&&a==P)||(e.4&&a==O)||(e.L&&a==p))5 3;2(a<I||a>H){2(a==p&&6.l.F==0)5 3;2(a==c.n(0)&&6.l.o(c)!=-1){b=j}2(a!=8&&a!=9&&a!=k&&a!=D&&a!=C&&a!=M&&a!=B&&a!=A){b=j}f{2(q e.i!="z"){2(e.h==e.m&&e.m!=0){b=3}f 2(e.h!=0&&e.i==0&&e.m==0){b=3}}}2(a==c.n(0)&&6.l.o(c)==-1){b=3}}f{b=3}5 b}).x(7(){g a=r(6).w();2(a!=""){g b=T U("^\\\\d+$|\\\\d*"+c+"\\\\d+");2(!b.s(a)){d.X(6)}}});5 6}',60,60,'||if|true|ctrlKey|return|this|function||||||||else|var|keyCode|charCode|false|13|value|which|charCodeAt|indexOf|45|typeof|jQuery|exec|120|88|65|val|blur|97|undefined|46|39|36|35|fn|length|input|57|48|toLowerCase|keypress|shiftKey|37|nodeName|86|118|90|122|67|new|RegExp|99|numeric|apply'.split('|'),0,{}))
var SimplyButtons={options:{hyperlinkClass:'button',activeButtonClass:'button_active',states:{outer:{active:{backgroundPosition:'bottom left'},inactive:{backgroundPosition:'top left'}},inner:{active:{backgroundPosition:'bottom right'},inactive:{backgroundPosition:'top right'}}},iphone:{replaceButtons:true}},buttons:[],iphone:false,init:function(options)
{for(var property in options)
{this.options[property]=options[property];}
this.iphone=(navigator.userAgent.match(/iPhone/i))||(navigator.userAgent.match(/iPod/i));this.process(document.getElementsByTagName('button'),false);this.process(document.getElementsByTagName('a'),true);if(this.iphone&&this.options.iphone.replaceButtons)
{this.remove();}},process:function(elements,links)
{var linkTest=new RegExp('\\b'+this.options.hyperlinkClass+'\\b');for(var a=0;a<elements.length;a++)
{if((links&&linkTest.test(elements[a].className))||!links)
{if(this.iphone&&!links)
{this.mobile(elements[a]);}
else
{this.disable(elements[a]);this.setup(elements[a]);}
if(!links)
{this.buttons.push(elements[a]);}}}},mobile:function(element)
{var input=document.createElement('input');input.setAttribute('type',element.getAttribute('type')=='submit'?'submit':'button');var attributes=new Array('id','name','value','class','onclick','onmouseover','onmouseout','onpress','onfocus','onblur','onmouseup','onmousedown');for(var a=0;a<attributes.length;a++)
{if(element.getAttribute(attributes[a]))
{input.setAttribute(attributes[a],element.getAttribute(attributes[a]));}}
input.style.marginLeft=element.style.marginLeft;input.style.marginRight=element.style.marginRight;element.parentNode.insertBefore(input,element);},remove:function()
{for(var a=0;a<this.buttons.length;a++)
{this.buttons[a].parentNode.removeChild(this.buttons[a]);}},disable:function(element)
{element.onselectstart=function(){return false;};element.style.MozUserSelect='none';element.style.KhtmlUserSelect='none';element.style.UserSelect='none';element.style.cursor='default';},setup:function(element)
{if(document.all)
{if(element.tagName=='BUTTON')
{element.attachEvent('onfocus',this.bind(this.toggle,this,element));}
else
{element.attachEvent('onmousedown',this.bind(this.toggle,this,element));}
element.attachEvent('onmouseup',this.bind(this.toggle,this,element));}
else
{element.onfocus=function(){this.blur();};}},toggle:function(o,element)
{if(element.tagName!='BUTTON'&&element.tagName!='A')
{while(element.tagName!='A')
{element=element.parentNode;}}
if(event.type=='focus'||event.type=='mousedown')
{element.className+=' '+o.options.activeButtonClass;o.style(element.childNodes[0],o.options.states.inner.active);o.style(element.childNodes[0].childNodes[0],o.options.states.outer.active);element.blur();}
else
{element.className=element.className.replace(o.options.activeButtonClass,'');o.style(element.childNodes[0],o.options.states.inner.inactive);o.style(element.childNodes[0].childNodes[0],o.options.states.outer.inactive);}},style:function(element,styles)
{for(var property in styles)
{element.style[property]=styles[property];}},bind:function(func)
{var args=[];for(var a=1;a<arguments.length;a++)
{args.push(arguments[a]);}
return function(){return func.apply(this,args);};}};;(function(d){var k=d.scrollTo=function(a,i,e){d(window).scrollTo(a,i,e)};k.defaults={axis:'xy',duration:parseFloat(d.fn.jquery)>=1.3?0:1};k.window=function(a){return d(window)._scrollable()};d.fn._scrollable=function(){return this.map(function(){var a=this,i=!a.nodeName||d.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!i)return a;var e=(a.contentWindow||a).document||a.ownerDocument||a;return d.browser.safari||e.compatMode=='BackCompat'?e.body:e.documentElement})};d.fn.scrollTo=function(n,j,b){if(typeof j=='object'){b=j;j=0}if(typeof b=='function')b={onAfter:b};if(n=='max')n=9e9;b=d.extend({},k.defaults,b);j=j||b.speed||b.duration;b.queue=b.queue&&b.axis.length>1;if(b.queue)j/=2;b.offset=p(b.offset);b.over=p(b.over);return this._scrollable().each(function(){var q=this,r=d(q),f=n,s,g={},u=r.is('html,body');switch(typeof f){case'number':case'string':if(/^([+-]=)?\d+(\.\d+)?(px|%)?$/.test(f)){f=p(f);break}f=d(f,this);case'object':if(f.is||f.style)s=(f=d(f)).offset()}d.each(b.axis.split(''),function(a,i){var e=i=='x'?'Left':'Top',h=e.toLowerCase(),c='scroll'+e,l=q[c],m=k.max(q,i);if(s){g[c]=s[h]+(u?0:l-r.offset()[h]);if(b.margin){g[c]-=parseInt(f.css('margin'+e))||0;g[c]-=parseInt(f.css('border'+e+'Width'))||0}g[c]+=b.offset[h]||0;if(b.over[h])g[c]+=f[i=='x'?'width':'height']()*b.over[h]}else{var o=f[h];g[c]=o.slice&&o.slice(-1)=='%'?parseFloat(o)/100*m:o}if(/^\d+$/.test(g[c]))g[c]=g[c]<=0?0:Math.min(g[c],m);if(!a&&b.queue){if(l!=g[c])t(b.onAfterFirst);delete g[c]}});t(b.onAfter);function t(a){r.animate(g,j,b.easing,a&&function(){a.call(this,n,b)})}}).end()};k.max=function(a,i){var e=i=='x'?'Width':'Height',h='scroll'+e;if(!d(a).is('html,body'))return a[h]-d(a)[e.toLowerCase()]();var c='client'+e,l=a.ownerDocument.documentElement,m=a.ownerDocument.body;return Math.max(l[h],m[h])-Math.min(l[c],m[c])};function p(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery);(function(b){function t(){b.fn.ajaxSubmit.debug&&window.console&&window.console.log&&window.console.log("[jquery.form] "+Array.prototype.join.call(arguments,""))}b.fn.ajaxSubmit=function(a){function d(){function n(){if(!z++){p.detachEvent?p.detachEvent("onload",n):p.removeEventListener("load",n,false);var r=true;try{if(A)throw"timeout";var m,o;o=p.contentWindow?p.contentWindow.document:p.contentDocument?p.contentDocument:p.document;if((o.body==null||o.body.innerHTML=="")&&!B){B=1;z--;setTimeout(n,100);return}j.responseText=o.body?o.body.innerHTML:null;j.responseXML=o.XMLDocument?o.XMLDocument:o;j.getResponseHeader=function(D){return{"content-type":i.dataType}[D]};if(i.dataType=="json"||i.dataType=="script"){var u=o.getElementsByTagName("textarea")[0];j.responseText=u?u.value:j.responseText}else if(i.dataType=="xml"&&!j.responseXML&&j.responseText!=null)j.responseXML=x(j.responseText);m=b.httpData(j,i.dataType)}catch(E){r=false;b.handleError(i,j,"error",E)}if(r){i.success(m,"success");v&&b.event.trigger("ajaxSuccess",[j,i])}v&&b.event.trigger("ajaxComplete",[j,i]);v&&!--b.active&&b.event.trigger("ajaxStop");if(i.complete)i.complete(j,r?"success":"error");setTimeout(function(){w.remove();j.responseXML=null},100)}}function x(r,m){if(window.ActiveXObject){m=new ActiveXObject("Microsoft.XMLDOM");m.async="false";m.loadXML(r)}else m=(new DOMParser).parseFromString(r,"text/xml");return m&&m.documentElement&&m.documentElement.tagName!="parsererror"?m:null}var l=g[0];if(b(":input[name=submit]",l).length)alert('Error: Form elements must not be named "submit".');else{var i=b.extend({},b.ajaxSettings,a),s=b.extend(true,{},b.extend(true,{},b.ajaxSettings),i),y="jqFormIO"+(new Date).getTime(),w=b('<iframe id="'+y+'" name="'+y+'" src="about:blank" />'),p=w[0];w.css({position:"absolute",top:"-1000px",left:"-1000px"});var j={aborted:0,responseText:null,responseXML:null,status:0,statusText:"n/a",getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(){this.aborted=1;w.attr("src","about:blank")}},v=i.global;v&&!b.active++&&b.event.trigger("ajaxStart");v&&b.event.trigger("ajaxSend",[j,i]);if(s.beforeSend&&s.beforeSend(j,s)===false)s.global&&b.active--;else if(!j.aborted){var z=0,A=0;if(s=l.clk){var C=s.name;if(C&&!s.disabled){a.extraData=a.extraData||{};a.extraData[C]=s.value;if(s.type=="image"){a.extraData[name+".x"]=l.clk_x;a.extraData[name+".y"]=l.clk_y}}}setTimeout(function(){var r=g.attr("target"),m=g.attr("action");l.setAttribute("target",y);l.getAttribute("method")!="POST"&&l.setAttribute("method","POST");l.getAttribute("action")!=i.url&&l.setAttribute("action",i.url);a.skipEncodingOverride||g.attr({encoding:"multipart/form-data",enctype:"multipart/form-data"});i.timeout&&setTimeout(function(){A=true;n()},i.timeout);var o=[];try{if(a.extraData)for(var u in a.extraData)o.push(b('<input type="hidden" name="'+u+'" value="'+a.extraData[u]+'" />').appendTo(l)[0]);w.appendTo("body");p.attachEvent?p.attachEvent("onload",n):p.addEventListener("load",n,false);l.submit()}finally{l.setAttribute("action",m);r?l.setAttribute("target",r):g.removeAttr("target");b(o).remove()}},10);var B=0}}}if(!this.length){t("ajaxSubmit: skipping submit process - no element selected");return this}if(typeof a=="function")a={success:a};var c=this.attr("action")||window.location.href;c=(c=(c.match(/^([^#]+)/)||[])[1])||"";a=b.extend({url:c,type:this.attr("method")||"GET"},a||{});c={};this.trigger("form-pre-serialize",[this,a,c]);if(c.veto){t("ajaxSubmit: submit vetoed via form-pre-serialize trigger");return this}if(a.beforeSerialize&&a.beforeSerialize(this,a)===false){t("ajaxSubmit: submit aborted via beforeSerialize callback");return this}var e=this.formToArray(a.semantic);if(a.data){a.extraData=a.data;for(var f in a.data)if(a.data[f]instanceof Array)for(var k in a.data[f])e.push({name:f,value:a.data[f][k]});else e.push({name:f,value:a.data[f]})}if(a.beforeSubmit&&a.beforeSubmit(e,this,a)===false){t("ajaxSubmit: submit aborted via beforeSubmit callback");return this}this.trigger("form-submit-validate",[e,this,a,c]);if(c.veto){t("ajaxSubmit: submit vetoed via form-submit-validate trigger");return this}f=b.param(e);if(a.type.toUpperCase()=="GET"){a.url+=(a.url.indexOf("?")>=0?"&":"?")+f;a.data=null}else a.data=f;var g=this,h=[];a.resetForm&&h.push(function(){g.resetForm()});a.clearForm&&h.push(function(){g.clearForm()});if(!a.dataType&&a.target){var q=a.success||function(){};h.push(function(n){b(a.target).html(n).each(q,arguments)})}else a.success&&h.push(a.success);a.success=function(n,x){for(var l=0,i=h.length;l<i;l++)h[l].apply(a,[n,x,g])};f=b("input:file",this).fieldValue();k=false;for(c=0;c<f.length;c++)if(f[c])k=true;if(a.iframe||k)a.closeKeepAlive?b.get(a.closeKeepAlive,d):d();else b.ajax(a);this.trigger("form-submit-notify",[this,a]);return this};b.fn.ajaxForm=function(a){return this.ajaxFormUnbind().bind("submit.form-plugin",function(){b(this).ajaxSubmit(a);return false}).each(function(){b(":submit,input:image",this).bind("click.form-plugin",function(d){var c=this.form;c.clk=this;if(this.type=="image")if(d.offsetX!=undefined){c.clk_x=d.offsetX;c.clk_y=d.offsetY}else if(typeof b.fn.offset=="function"){var e=b(this).offset();c.clk_x=d.pageX-e.left;c.clk_y=d.pageY-e.top}else{c.clk_x=d.pageX-this.offsetLeft;c.clk_y=d.pageY-this.offsetTop}setTimeout(function(){c.clk=c.clk_x=c.clk_y=null},10)})})};b.fn.ajaxFormUnbind=function(){this.unbind("submit.form-plugin");return this.each(function(){b(":submit,input:image",this).unbind("click.form-plugin")})};b.fn.formToArray=function(a){var d=[];if(this.length==0)return d;var c=this[0],e=a?c.getElementsByTagName("*"):c.elements;if(!e)return d;for(var f=0,k=e.length;f<k;f++){var g=e[f],h=g.name;if(h)if(a&&c.clk&&g.type=="image")!g.disabled&&c.clk==g&&d.push({name:h+".x",value:c.clk_x},{name:h+".y",value:c.clk_y});else if((g=b.fieldValue(g,true))&&g.constructor==Array)for(var q=0,n=g.length;q<n;q++)d.push({name:h,value:g[q]});else g!==null&&typeof g!="undefined"&&d.push({name:h,value:g})}if(!a&&c.clk){a=c.getElementsByTagName("input");f=0;for(k=a.length;f<k;f++){e=a[f];(h=e.name)&&!e.disabled&&e.type=="image"&&c.clk==e&&d.push({name:h+".x",value:c.clk_x},{name:h+".y",value:c.clk_y})}}return d};b.fn.formSerialize=function(a){return b.param(this.formToArray(a))};b.fn.fieldSerialize=function(a){var d=[];this.each(function(){var c=this.name;if(c){var e=b.fieldValue(this,a);if(e&&e.constructor==Array)for(var f=0,k=e.length;f<k;f++)d.push({name:c,value:e[f]});else e!==null&&typeof e!="undefined"&&d.push({name:this.name,value:e})}});return b.param(d)};b.fn.fieldValue=function(a){for(var d=[],c=0,e=this.length;c<e;c++){var f=b.fieldValue(this[c],a);f===null||typeof f=="undefined"||f.constructor==Array&&!f.length||(f.constructor==Array?b.merge(d,f):d.push(f))}return d};b.fieldValue=function(a,d){var c=a.name,e=a.type,f=a.tagName.toLowerCase();if(typeof d=="undefined")d=true;if(d&&(!c||a.disabled||e=="reset"||e=="button"||(e=="checkbox"||e=="radio")&&!a.checked||(e=="submit"||e=="image")&&a.form&&a.form.clk!=a||f=="select"&&a.selectedIndex==-1))return null;if(f=="select"){var k=a.selectedIndex;if(k<0)return null;c=[];f=a.options;var g=(e=e=="select-one")?k+1:f.length;for(k=e?k:0;k<g;k++){var h=f[k];if(h.selected){var q=h.value;q||(q=h.attributes&&h.attributes.value&&!h.attributes.value.specified?h.text:h.value);if(e)return q;c.push(q)}}return c}return a.value};b.fn.clearForm=function(){return this.each(function(){b("input,select,textarea",this).clearFields()})};b.fn.clearFields=b.fn.clearInputs=function(){return this.each(function(){var a=this.type,d=this.tagName.toLowerCase();if(a=="text"||a=="password"||d=="textarea")this.value="";else if(a=="checkbox"||a=="radio")this.checked=false;else if(d=="select")this.selectedIndex=-1})};b.fn.resetForm=function(){return this.each(function(){if(typeof this.reset=="function"||typeof this.reset=="object"&&!this.reset.nodeType)this.reset()})};b.fn.enable=function(a){if(a==undefined)a=true;return this.each(function(){this.disabled=!a})};b.fn.selected=function(a){if(a==undefined)a=true;return this.each(function(){var d=this.type;if(d=="checkbox"||d=="radio")this.checked=a;else if(this.tagName.toLowerCase()=="option"){d=b(this).parent("select");a&&d[0]&&d[0].type=="select-one"&&d.find("option").selected(false);this.selected=a}})}})(jQuery);jQuery.fn.supersleight=function(c){c=jQuery.extend({imgs:true,backgrounds:true,shim:"x.gif",apply_positioning:true},c);return this.each(function(){jQuery.browser.msie&&parseInt(jQuery.browser.version,10)<7&&parseInt(jQuery.browser.version,10)>4&&jQuery(this).find("*").andSelf().each(function(f,d){var a=jQuery(d);if(c.backgrounds&&a.css("background-image").match(/\.png/i)!==null){var b=a.css("background-image");b=b.substring(5,b.length-2);var e=a.css("background-repeat")=="no-repeat"?"crop":"scale";b={filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+b+"', sizingMethod='"+e+"')","background-image":"url("+c.shim+")"};a.css(b)}if(c.imgs&&a.is("img[src$=png]")){b={width:a.width()+"px",height:a.height()+"px",filter:"progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+a.attr("src")+"', sizingMethod='scale')"};a.css(b).attr("src",c.shim)}if(c.apply_positioning&&a.is("a, input")&&(a.css("position")===""||a.css("position")=="static"))a.css("position","relative")})})};jQuery.easing.jswing=jQuery.easing.swing;jQuery.extend(jQuery.easing,{def:"easeOutQuad",swing:function(e,a,c,b,d){return jQuery.easing[jQuery.easing.def](e,a,c,b,d)},easeInQuad:function(e,a,c,b,d){return b*(a/=d)*a+c},easeOutQuad:function(e,a,c,b,d){return-b*(a/=d)*(a-2)+c},easeInOutQuad:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a+c;return-b/2*(--a*(a-2)-1)+c},easeInCubic:function(e,a,c,b,d){return b*(a/=d)*a*a+c},easeOutCubic:function(e,a,c,b,d){return b*((a=a/d-1)*a*a+1)+c},easeInOutCubic:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a+c;return b/2*((a-=2)*a*a+2)+c},easeInQuart:function(e,a,c,b,d){return b*(a/=d)*a*a*a+c},easeOutQuart:function(e,a,c,b,d){return-b*((a=a/d-1)*a*a*a-1)+c},easeInOutQuart:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a+c;return-b/2*((a-=2)*a*a*a-2)+c},easeInQuint:function(e,a,c,b,d){return b*(a/=d)*a*a*a*a+c},easeOutQuint:function(e,a,c,b,d){return b*((a=a/d-1)*a*a*a*a+1)+c},easeInOutQuint:function(e,a,c,b,d){if((a/=d/2)<1)return b/2*a*a*a*a*a+c;return b/2*((a-=2)*a*a*a*a+2)+c},easeInSine:function(e,a,c,b,d){return-b*Math.cos(a/d*(Math.PI/2))+b+c},easeOutSine:function(e,a,c,b,d){return b*Math.sin(a/d*(Math.PI/2))+c},easeInOutSine:function(e,a,c,b,d){return-b/2*(Math.cos(Math.PI*a/d)-1)+c},easeInExpo:function(e,a,c,b,d){return a==0?c:b*Math.pow(2,10*(a/d-1))+c},easeOutExpo:function(e,a,c,b,d){return a==d?c+b:b*(-Math.pow(2,-10*a/d)+1)+c},easeInOutExpo:function(e,a,c,b,d){if(a==0)return c;if(a==d)return c+b;if((a/=d/2)<1)return b/2*Math.pow(2,10*(a-1))+c;return b/2*(-Math.pow(2,-10*--a)+2)+c},easeInCirc:function(e,a,c,b,d){return-b*(Math.sqrt(1-(a/=d)*a)-1)+c},easeOutCirc:function(e,a,c,b,d){return b*Math.sqrt(1-(a=a/d-1)*a)+c},easeInOutCirc:function(e,a,c,b,d){if((a/=d/2)<1)return-b/2*(Math.sqrt(1-a*a)-1)+c;return b/2*(Math.sqrt(1-(a-=2)*a)+1)+c},easeInElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return-(g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f))+c},easeOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d)==1)return c+b;f||(f=d*0.3);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);return g*Math.pow(2,-10*a)*Math.sin((a*d-e)*2*Math.PI/f)+b+c},easeInOutElastic:function(e,a,c,b,d){e=1.70158;var f=0,g=b;if(a==0)return c;if((a/=d/2)==2)return c+b;f||(f=d*0.3*1.5);if(g<Math.abs(b)){g=b;e=f/4}else e=f/(2*Math.PI)*Math.asin(b/g);if(a<1)return-0.5*g*Math.pow(2,10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)+c;return g*Math.pow(2,-10*(a-=1))*Math.sin((a*d-e)*2*Math.PI/f)*0.5+b+c},easeInBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*(a/=d)*a*((f+1)*a-f)+c},easeOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;return b*((a=a/d-1)*a*((f+1)*a+f)+1)+c},easeInOutBack:function(e,a,c,b,d,f){if(f==undefined)f=1.70158;if((a/=d/2)<1)return b/2*a*a*(((f*=1.525)+1)*a-f)+c;return b/2*((a-=2)*a*(((f*=1.525)+1)*a+f)+2)+c},easeInBounce:function(e,a,c,b,d){return b-jQuery.easing.easeOutBounce(e,d-a,0,b,d)+c},easeOutBounce:function(e,a,c,b,d){return(a/=d)<1/2.75?b*7.5625*a*a+c:a<2/2.75?b*(7.5625*(a-=1.5/2.75)*a+0.75)+c:a<2.5/2.75?b*(7.5625*(a-=2.25/2.75)*a+0.9375)+c:b*(7.5625*(a-=2.625/2.75)*a+0.984375)+c},easeInOutBounce:function(e,a,c,b,d){if(a<d/2)return jQuery.easing.easeInBounce(e,a*2,0,b,d)*0.5+c;return jQuery.easing.easeOutBounce(e,a*2-d,0,b,d)*0.5+b*0.5+c}});jQuery.fn.extend({everyTime:function(b,a,c,d,e){return this.each(function(){jQuery.timer.add(this,b,a,c,d,e)})},oneTime:function(b,a,c){return this.each(function(){jQuery.timer.add(this,b,a,c,1)})},stopTime:function(b,a){return this.each(function(){jQuery.timer.remove(this,b,a)})}});jQuery.extend({timer:{guid:1,global:{},regex:/^([0-9]+)\s*(.*s)?$/,powers:{ms:1,cs:10,ds:100,s:1E3,das:1E4,hs:1E5,ks:1E6},timeParse:function(b){if(b==undefined||b==null)return null;var a=this.regex.exec(jQuery.trim(b.toString()));return a[2]?parseInt(a[1],10)*(this.powers[a[2]]||1):b},add:function(b,a,c,d,e,f){var g=0;if(jQuery.isFunction(c)){e||(e=d);d=c;c=a}a=jQuery.timer.timeParse(a);if(!(typeof a!="number"||isNaN(a)||a<=0)){if(e&&e.constructor!=Number){f=!!e;e=0}e=e||0;f=f||false;if(!b.$timers)b.$timers={};b.$timers[c]||(b.$timers[c]={});d.$timerID=d.$timerID||this.guid++;var h=function(){if(!(f&&this.inProgress)){this.inProgress=true;if(++g>e&&e!==0||d.call(b,g)===false)jQuery.timer.remove(b,c,d);this.inProgress=false}};h.$timerID=d.$timerID;b.$timers[c][d.$timerID]||(b.$timers[c][d.$timerID]=window.setInterval(h,a));this.global[c]||(this.global[c]=[]);this.global[c].push(b)}},remove:function(b,a,c){var d=b.$timers,e;if(d){if(a){if(d[a]){if(c){if(c.$timerID){window.clearInterval(d[a][c.$timerID]);delete d[a][c.$timerID]}}else for(c in d[a]){window.clearInterval(d[a][c]);delete d[a][c]}for(e in d[a])break;if(!e){e=null;delete d[a]}}}else for(a in d)this.remove(b,a,c);for(e in d)break;if(!e)b.$timers=null}}}});jQuery.browser.msie&&jQuery(window).one("unload",function(){var b=jQuery.timer.global;for(var a in b)for(var c=b[a],d=c.length;--d;)jQuery.timer.remove(c[d],a)});(function(b){b.fn.galleryView=function(E){function x(c){b("img.nav-next").unbind("click");b("img.nav-prev").unbind("click");d.unbind("click");has_panels&&a.fade_panels&&f.fadeOut(a.transition_speed).eq(c%e).fadeIn(a.transition_speed,function(){if(!has_filmstrip){b("img.nav-prev").click(t);b("img.nav-next").click(l)}});if(has_filmstrip){if(o=="strip"){i.stop();var k=p(d[c]).left-(p(r[0]).left+2);i.animate({left:(k>=0?"-=":"+=")+Math.abs(k)+"px"},a.transition_speed,a.easing,function(){if(c>e){c%=e;j=c;i.css("left","-"+(a.frame_width+m)*c+"px")}else if(c<=e-strip_size){j=c=c%e+e;i.css("left","-"+(a.frame_width+m)*c+"px")}a.fade_panels||f.hide().eq(c%e).show();b("img.nav-prev").click(t);b("img.nav-next").click(l);y()})}else if(o=="pointer"){r.stop();k=p(d[c]);r.animate({left:k.left-2+"px"},a.transition_speed,a.easing,function(){a.fade_panels||f.hide().eq(c%e).show();b("img.nav-prev").click(t);b("img.nav-next").click(l);y()})}b("a",d[c])[0]&&r.unbind("click").click(function(){var h=b("a",d[c]).eq(0);if(h.attr("target")=="_blank")window.open(h.attr("href"));else location.href=h.attr("href")})}}function l(){b(document).stopTime("transition");if(++j==d.length)j=0;x(j);b(document).everyTime(a.transition_interval,"transition",function(){l()})}function t(){b(document).stopTime("transition");if(--j<0)j=e-1;x(j);b(document).everyTime(a.transition_interval,"transition",function(){l()})}function p(c){var k=0,h=0,w=c.id;if(c.offsetParent){do{k+=c.offsetLeft;h+=c.offsetTop}while(c=c.offsetParent)}if(w==A)return{left:k,top:h};else{c=p(g[0]);return{left:k-c.left,top:h-c.top}}}function y(){d.each(function(c){b("a",this).length==0&&b(this).click(function(){b(document).stopTime("transition");x(c);j=c;b(document).everyTime(a.transition_interval,"transition",function(){l()})})})}function F(){b(".panel-overlay").length>0&&f.append('<div class="overlay"></div>');if(!has_filmstrip){b("<img />").addClass("nav-next").attr("src","/images/next.png").appendTo(g).css({position:"absolute",zIndex:"1100",cursor:"pointer",top:a.panel_height+5+"px",left:q/2+"px",display:"none"}).click(l);b("<img />").addClass("nav-prev").attr("src","/images/prev.png").appendTo(g).css({position:"absolute",zIndex:"1100",cursor:"pointer",top:a.panel_height+5+"px",left:q/2-30+"px",display:"none"}).click(t)}f.css({width:a.panel_width-parseInt(f.css("paddingLeft").split("px")[0],10)-parseInt(f.css("paddingRight").split("px")[0],10)+"px",height:a.panel_height-parseInt(f.css("paddingTop").split("px")[0],10)-parseInt(f.css("paddingBottom").split("px")[0],10)+"px",position:"absolute",top:a.filmstrip_position=="top"?a.frame_height+n+(a.show_captions?u:n)+"px":"0px",left:"0px",overflow:"hidden",background:"white",display:"none"});b(".panel-overlay",f).css({position:"absolute",zIndex:"999",width:a.panel_width-20+"px",height:a.overlay_height+"px",top:a.overlay_position=="top"?"0":a.panel_height-a.overlay_height+"px",left:"0",padding:"0 10px",color:a.overlay_text_color,fontSize:a.overlay_font_size});b(".panel-overlay a",f).css({color:a.overlay_text_color,textDecoration:"underline",fontWeight:"bold"});b(".overlay",f).css({position:"absolute",zIndex:"998",width:a.panel_width+"px",height:a.overlay_height+"px",top:a.overlay_position=="top"?"0":a.panel_height-a.overlay_height+"px",left:"0",background:a.overlay_color,opacity:a.overlay_opacity});b(".panel iframe",f).css({width:a.panel_width+"px",height:a.panel_height-a.overlay_height+"px",border:"0"})}function G(){i.wrap('<div class="strip_wrapper"></div>');if(o=="strip"){d.clone().appendTo(i);d.clone().appendTo(i);d=b("li",i)}a.show_captions&&d.append('<div class="caption"></div>').each(function(){b(this).find(".caption").html(b(this).find("img").attr("title"))});i.css({listStyle:"none",margin:"0",padding:"0",width:B+"px",position:"absolute",zIndex:"900",top:"0",left:"0",height:a.frame_height+10+"px",background:a.background_color});d.css({"float":"left",position:"relative",height:a.frame_height+"px",zIndex:"901",marginTop:n+"px",marginBottom:"0px",marginRight:m+"px",padding:"0",cursor:"pointer"});b("img",d).css({border:"none"});b(".strip_wrapper",g).css({position:"absolute",top:a.filmstrip_position=="top"?"0px":a.panel_height+"px",left:(q-v)/2+"px",width:v+"px",height:a.frame_height+n+(a.show_captions?u:n)+"px",overflow:"hidden"});b(".caption",g).css({position:"absolute",top:a.frame_height+"px",left:"0",margin:"0",width:a.frame_width+"px",padding:"0",color:a.caption_text_color,textAlign:"center",fontSize:"10px",height:u+"px",lineHeight:u+"px"});b("<div></div>").attr("id","pointer").appendTo(g).css({position:"absolute",zIndex:"1000",cursor:"pointer",top:p(d[0]).top-s/2+"px",left:p(d[0]).left-s/2+"px",height:a.frame_height-s+"px",width:a.frame_width-s+"px",border:has_panels?s+"px solid "+(a.nav_theme=="dark"?"black":"white"):"none"});r=b("#pointer",g);if(has_panels)b("<img />").attr("src",C+a.nav_theme+"/pointer"+(a.filmstrip_position=="top"?"-down":"")+".png").appendTo(b("#pointer")).css({position:"absolute",zIndex:"1001",top:a.filmstrip_position=="bottom"?"-"+(10+s)+"px":a.frame_height+"px",left:a.frame_width/2-10+"px"});if(o=="strip"){i.css("left","-"+(a.frame_width+m)*e+"px");j=e}b("a",d[j])[0]&&r.click(function(){var c=b("a",d[j]).eq(0);if(c.attr("target")=="_blank")window.open(c.attr("href"));else location.href=c.attr("href")});b("<img />").addClass("nav-next").attr("src","/images/next.png").appendTo(g).css({position:"absolute",cursor:"pointer",top:(a.filmstrip_position=="top"?0:a.panel_height)+n+(a.frame_height-22)/2+"px",right:q/2-v/2-10-22+"px"}).click(l);b("<img />").addClass("nav-prev").attr("src","/images/prev.png").appendTo(g).css({position:"absolute",cursor:"pointer",top:(a.filmstrip_position=="top"?0:a.panel_height)+n+(a.frame_height-22)/2+"px",left:q/2-v/2-10-22+"px"}).click(t)}function H(c,k){var h=p(g[0]),w=h.top;h=h.left;return c>h&&c<h+a.panel_width&&k>w&&k<w+a.panel_height}var a=b.extend(b.fn.galleryView.defaults,E),A,j=0,q,D,m=10,B,v,e=0,o,C,z=false,u=20,n=5,s=2,g,i,d,f,r;return this.each(function(){g=b(this);b("script").each(function(){var c=b(this);if(c.attr("src")&&c.attr("src").match(/jquery\.galleryview/))C=c.attr("src").split("jquery.galleryview")[0]+"themes/"});g.css("visibility","hidden");i=b(".filmstrip",g);d=b("li",i);f=b(".panel",g);A=g.attr("id");has_panels=f.length>0;has_filmstrip=d.length>0;if(!has_panels)a.panel_height=0;e=has_panels?f.length:d.length;strip_size=has_panels?Math.floor((a.panel_width-64)/(a.frame_width+m)):Math.min(e,a.filmstrip_size);if(strip_size>=e){o="pointer";strip_size=e}else o="strip";q=has_panels?a.panel_width:strip_size*(a.frame_width+m)-m+64;D=(has_panels?a.panel_height:0)+(has_filmstrip?a.frame_height+n+(a.show_captions?u:n):0);B=o=="pointer"?a.frame_width*e+m*e:a.frame_width*e*3+m*e*3;v=strip_size*a.frame_width+(strip_size-1)*m;g.css({position:"relative",margin:"0",background:a.background_color,border:a.border,width:q+"px",height:D+"px"});has_filmstrip&&G();has_panels&&F();b(".nav-overlay").fadeIn("fast");b(".nav-next").fadeIn("fast");b(".nav-prev").fadeIn("fast");b(".panel-overlay").fadeIn("fast");b(".overlay").fadeIn("fast");has_filmstrip&&y();b().mousemove(function(c){if(H(c.pageX,c.pageY))a.pause_on_hover&&b(document).oneTime(500,"animation_pause",function(){b(document).stopTime("transition");z=true});else if(a.pause_on_hover){b(document).stopTime("animation_pause");if(z){b(document).everyTime(a.transition_interval,"transition",function(){l()});z=false}}});f.eq(0).show();e>1&&b(document).everyTime(a.transition_interval,"transition",function(){l()});g.css("visibility","visible")})};b.fn.galleryView.defaults={panel_width:400,panel_height:300,frame_width:80,frame_height:80,filmstrip_size:3,overlay_height:70,overlay_font_size:"1em",transition_speed:400,transition_interval:6E3,overlay_opacity:0.6,overlay_color:"black",background_color:"black",overlay_text_color:"white",caption_text_color:"white",border:"1px solid black",nav_theme:"light",easing:"swing",filmstrip_position:"bottom",overlay_position:"bottom",show_captions:false,fade_panels:true,pause_on_hover:false}})(jQuery);(function(a){a.alerts={verticalOffset:-75,horizontalOffset:0,repositionOnResize:true,overlayOpacity:0.01,overlayColor:"#FFF",draggable:true,okButton:"&nbsp;OK&nbsp;",cancelButton:"&nbsp;Cancel&nbsp;",dialogClass:null,alert:function(b,c,d){if(c==null)c="Alert";a.alerts._show(c,b,null,"alert",function(e){d&&d(e)})},confirm:function(b,c,d){if(c==null)c="Confirm";a.alerts._show(c,b,null,"confirm",function(e){d&&d(e)})},prompt:function(b,c,d,e){if(d==null)d="Prompt";a.alerts._show(d,b,c,"prompt",function(f){e&&e(f)})},_show:function(b,c,d,e,f){a.alerts._hide();a.alerts._overlay("show");a("BODY").append('<div id="popup_container"><h1 id="popup_title"></h1><div id="popup_content"><div id="popup_message"></div></div></div>');a.alerts.dialogClass&&a("#popup_container").addClass(a.alerts.dialogClass);var h=a.browser.msie&&parseInt(a.browser.version)<=6?"absolute":"fixed";a("#popup_container").css({position:h,zIndex:99999,padding:0,margin:0});a("#popup_title").text(b);a("#popup_content").addClass(e);a("#popup_message").text(c);a("#popup_message").html(a("#popup_message").text().replace(/\n/g,"<br />"));a("#popup_container").css({minWidth:a("#popup_container").outerWidth(),maxWidth:a("#popup_container").outerWidth()});a.alerts._reposition();a.alerts._maintainPosition(true);switch(e){case"alert":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /></div>');a("#popup_ok").click(function(){a.alerts._hide();f(true)});a("#popup_ok").focus().keypress(function(g){if(g.keyCode==13||g.keyCode==27)a("#popup_ok").trigger("click")});break;case"confirm":a("#popup_message").after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_ok").click(function(){a.alerts._hide();f&&f(true)});a("#popup_cancel").click(function(){a.alerts._hide();f&&f(false)});a("#popup_ok").focus();a("#popup_ok, #popup_cancel").keypress(function(g){g.keyCode==13&&a("#popup_ok").trigger("click");g.keyCode==27&&a("#popup_cancel").trigger("click")});break;case"prompt":a("#popup_message").append('<br /><input type="text" size="30" id="popup_prompt" />').after('<div id="popup_panel"><input type="button" value="'+a.alerts.okButton+'" id="popup_ok" /> <input type="button" value="'+a.alerts.cancelButton+'" id="popup_cancel" /></div>');a("#popup_prompt").width(a("#popup_message").width());a("#popup_ok").click(function(){var g=a("#popup_prompt").val();a.alerts._hide();f&&f(g)});a("#popup_cancel").click(function(){a.alerts._hide();f&&f(null)});a("#popup_prompt, #popup_ok, #popup_cancel").keypress(function(g){g.keyCode==13&&a("#popup_ok").trigger("click");g.keyCode==27&&a("#popup_cancel").trigger("click")});d&&a("#popup_prompt").val(d);a("#popup_prompt").focus().select();break}if(a.alerts.draggable)try{a("#popup_container").draggable({handle:a("#popup_title")});a("#popup_title").css({cursor:"move"})}catch(i){}},_hide:function(){a("#popup_container").remove();a.alerts._overlay("hide");a.alerts._maintainPosition(false)},_overlay:function(b){switch(b){case"show":a.alerts._overlay("hide");a("BODY").append('<div id="popup_overlay"></div>');a("#popup_overlay").css({position:"absolute",zIndex:99998,top:"0px",left:"0px",width:"100%",height:a(document).height(),background:a.alerts.overlayColor,opacity:a.alerts.overlayOpacity});break;case"hide":a("#popup_overlay").remove();break}},_reposition:function(){var b=a(window).height()/2-a("#popup_container").outerHeight()/2+a.alerts.verticalOffset,c=a(window).width()/2-a("#popup_container").outerWidth()/2+a.alerts.horizontalOffset;if(b<0)b=0;if(c<0)c=0;if(a.browser.msie&&parseInt(a.browser.version)<=6)b+=a(window).scrollTop();a("#popup_container").css({top:b+"px",left:c+"px"});a("#popup_overlay").height(a(document).height())},_maintainPosition:function(b){if(a.alerts.repositionOnResize)switch(b){case true:a(window).bind("resize",a.alerts._reposition);break;case false:a(window).unbind("resize",a.alerts._reposition);break}}};jAlert=function(b,c,d){a.alerts.alert(b,c,d)};jConfirm=function(b,c,d){a.alerts.confirm(b,c,d)};jPrompt=function(b,c,d,e){a.alerts.prompt(b,c,d,e)}})(jQuery);(function($){$.gritter={};$.gritter.options={fade_in_speed:'medium',fade_out_speed:1000,time:6000}
$.gritter.add=function(params){try{return Gritter.add(params||{});}catch(e){var err='Gritter Error: '+e;(typeof(console)!='undefined'&&console.error)?console.error(err,params):alert(err);}}
$.gritter.remove=function(id,params){Gritter.removeSpecific(id,params||{});}
$.gritter.removeAll=function(params){Gritter.stop(params||{});}
var Gritter={fade_in_speed:'',fade_out_speed:'',time:'',_custom_timer:0,_item_count:0,_is_setup:0,_tpl_close:'<div class="gritter-close"></div>',_tpl_item:'<div id="gritter-item-[[number]]" class="gritter-item-wrapper [[item_class]]" style="display:none"><div class="gritter-top"></div><div class="gritter-item">[[image]]<div class="[[class_name]]"><span class="gritter-title">[[username]]</span><p>[[text]]</p></div><div style="clear:both"></div></div><div class="gritter-bottom"></div></div>',_tpl_wrap:'<div id="gritter-notice-wrapper"></div>',add:function(params){
if(!params.title||!params.text){}
if(!this._is_setup){this._runSetup();}
var user=params.title,text=params.text,image=params.image||'',sticky=params.sticky||false,item_class=params.class_name||'',time_alive=params.time||'';this._verifyWrapper();this._item_count++;var number=this._item_count,tmp=this._tpl_item;$(['before_open','after_open','before_close','after_close']).each(function(i,val){Gritter['_'+val+'_'+number]=($.isFunction(params[val]))?params[val]:function(){}});this._custom_timer=0;if(time_alive){this._custom_timer=time_alive;}
var image_str=(image!='')?'<img src="'+image+'" class="gritter-image" />':'',class_name=(image!='')?'gritter-with-image':'gritter-without-image';tmp=this._str_replace(['[[username]]','[[text]]','[[image]]','[[number]]','[[class_name]]','[[item_class]]'],[user,text,image_str,this._item_count,class_name,item_class],tmp);this['_before_open_'+number]();$('#gritter-notice-wrapper').append(tmp);var item=$('#gritter-item-'+this._item_count);item.fadeIn(this.fade_in_speed,function(){Gritter['_after_open_'+number]($(this));});if(!sticky){this._setFadeTimer(item,number);}
$(item).bind('mouseenter mouseleave',function(event){if(event.type=='mouseenter'){if(!sticky){Gritter._restoreItemIfFading($(this),number);}}
else{if(!sticky){Gritter._setFadeTimer($(this),number);}}
Gritter._hoverState($(this),event.type);});return number;},_countRemoveWrapper:function(unique_id,e){e.remove();this['_after_close_'+unique_id](e);if($('.gritter-item-wrapper').length==0){$('#gritter-notice-wrapper').remove();}},_fade:function(e,unique_id,params,unbind_events){var params=params||{},fade=(typeof(params.fade)!='undefined')?params.fade:true;fade_out_speed=params.speed||this.fade_out_speed;this['_before_close_'+unique_id](e);if(unbind_events){e.unbind('mouseenter mouseleave');}
if(fade){e.animate({opacity:0},fade_out_speed,function(){e.animate({height:0},300,function(){Gritter._countRemoveWrapper(unique_id,e);})})}
else{this._countRemoveWrapper(unique_id,e);}},_hoverState:function(e,type){if(type=='mouseenter'){e.addClass('hover');var find_img=e.find('img');(find_img.length)?find_img.before(this._tpl_close):e.find('span').before(this._tpl_close);e.find('.gritter-close').click(function(){var unique_id=e.attr('id').split('-')[2];Gritter.removeSpecific(unique_id,{},e,true);});}
else{e.removeClass('hover');e.find('.gritter-close').remove();}},removeSpecific:function(unique_id,params,e,unbind_events){if(!e){var e=$('#gritter-item-'+unique_id);}
this._fade(e,unique_id,params||{},unbind_events);},_restoreItemIfFading:function(e,unique_id){clearTimeout(this['_int_id_'+unique_id]);e.stop().css({opacity:''});},_runSetup:function(){for(opt in $.gritter.options){this[opt]=$.gritter.options[opt];}
this._is_setup=1;},_setFadeTimer:function(e,unique_id){var timer_str=(this._custom_timer)?this._custom_timer:this.time;this['_int_id_'+unique_id]=setTimeout(function(){Gritter._fade(e,unique_id);},timer_str);},stop:function(params){var before_close=($.isFunction(params.before_close))?params.before_close:function(){};var after_close=($.isFunction(params.after_close))?params.after_close:function(){};var wrap=$('#gritter-notice-wrapper');before_close(wrap);wrap.fadeOut(function(){$(this).remove();after_close();});},_str_replace:function(search,replace,subject,count){var i=0,j=0,temp='',repl='',sl=0,fl=0,f=[].concat(search),r=[].concat(replace),s=subject,ra=r instanceof Array,sa=s instanceof Array;s=[].concat(s);if(count){this.window[count]=0;}
for(i=0,sl=s.length;i<sl;i++){if(s[i]===''){continue;}
for(j=0,fl=f.length;j<fl;j++){temp=s[i]+'';repl=ra?(r[j]!==undefined?r[j]:''):r[0];s[i]=(temp).split(f[j]).join(repl);if(count&&s[i]!==temp){this.window[count]+=(temp.length-s[i].length)/f[j].length;}}}
return sa?s:s[0];},_verifyWrapper:function(){if($('#gritter-notice-wrapper').length==0){$('body').append(this._tpl_wrap);}}}})(jQuery);(function(b){function f(c){var a=b(c),d=a.data("onClose");c=function(){i(a);b.isFunction(d)&&d()};var e=a.data("speed");switch(a.data("effect")){case"none":a.hide("",c);case"fade":a.fadeOut(e,c);default:a.slideUp(e,c)}}function i(c){clearInterval(g);clearTimeout(j);b(c).find("div").unbind("click");b(c).stop().remove()}function m(){var c=document.getElementById("jnotifica_main");if(c)c.style.top=parseInt(document.documentElement.scrollTop)+"px"}function n(){var c=document.getElementById("jnotifica_main");if(c)c.style.top=parseInt(document.documentElement.scrollTop+document.documentElement.clientHeight-c.offsetHeight)+"px"}function o(c,a){var d=b('<div id="jnotifica_main" class="jnotifica_main"/>').css({position:k?"absolute":"fixed",overflow:"hidden",zIndex:a.zIndex,width:"250px",right:0}).addClass(a.classes).hide(),e=b('<div class="jnotifica_spc"/>').css("padding",a.margin),h=b('<div class="jnotifica_cont"/>').css({position:"relative",cursor:a.cursor}),l=b('<div class="jnotifica_bg"/>').css({position:"absolute",height:"100%",top:0,right:0,width:"250px",background:a.background,zIndex:a.zIndex+1,opacity:a.opacity});Msg=b('<div class="jnotifica_msg"/>').css({position:"relative",zIndex:a.zIndex+2,color:a.color,padding:a.padding}).css(a.msgCss).html(c);a.position=="bottom"?d.css("bottom",0):d.css("top",0);if(k){l.css("height","1000px");if(a.position=="bottom"){d.css("bottom","auto");g=setInterval(function(){n()},50)}else g=setInterval(function(){m()},50)}if(a.width!="all"){e.css("width",parseInt(a.width));if(a.align=="left")e.css("float","left");else a.align=="right"?e.css("float","right"):e.css({marginLeft:"auto",marginRight:"auto"})}a.close!==false&&h.append(b('<div class="jnotifica_close"/>').css(a.close.css).css("zIndex",a.zIndex+4).html(a.close.text).click(function(){f(d)}));b("body").append(d.append(e.append(h.append(l).append(Msg))));e=function(){if(a.timeout>0)j=setTimeout(function(){f(d)},a.timeout)};switch(a.effect){case"none":d.show("",e);case"fade":d.fadeIn(a.speed,e);default:d.slideDown(a.speed,e)}a.clickClose&&h.click(function(){f(d)});d.data({effect:a.effect,speed:a.speed,onClose:a.onClose});b.isFunction(a.onShow)&&a.onShow(d)}var k=b.browser.msie&&/MSIE 6.0/.test(navigator.userAgent),j,g;b.jnotifica_defaults={margin:0,position:"top",width:"all",align:"center",padding:25,background:"#000",zIndex:100,color:"#fff",opacity:0.8,cursor:"pointer",msgCss:{fontSize:"15px",fontFamily:"Arial, sans-serif",textAlign:"left"},effect:"slide",speed:500,timeout:5E3,clickClose:true,close:{text:"[CLOSE]",css:{color:"#fff",fontSize:"10px",position:"absolute",top:5,right:10,cursor:"pointer"}},onShow:function(){},onClose:function(){},classes:""};b.jnotifica=b.jN=function(c,a){c=c?c:"Hello";a=a?a:{};var d=b.extend(true,{},b.jnotifica_defaults,a);i(b("#jnotifica_main"));o(c,d)};b.fn.jnotifica=b.fn.jN=function(c){return b.jN(b(this).html(),c)};b.jnotifica.close=function(){f(b("#jnotifica_main"))};b.jnotifica.version="v3"})(jQuery);(function($){$.fn.fullsize=function(options){var defaults={shadow:true,zoomInSpeed:200,zoomOutSpeed:200,fadeInSpeed:250,fadeOutSpeed:250,leftOffset:0,topOffset:0,iconOffset:8,forceTitleBar:false,extraTrigger:false,parentSteps:0,destroy:false,start:function(){},end:function(){}};var opts=$.extend(defaults,options);if(opts.destroy==true){$("div.fullsize-icon").remove()}$(document).keydown(function(event){if(event.keyCode==27){$("div.fullsize-wrapper, div.fullsize-sh-wrap").fadeOut(opts.fadeOutSpeed,function(){$(this).remove()});opts.end.call(this)}});return this.each(function(){if(opts.destroy==true){$(this).unbind()}else{if($(this).attr("longdesc")){var org_image=$(this);var img_title=org_image.attr("title");var img_src=org_image.attr("longdesc");var icon=$("<div></div>").addClass("fullsize-icon").css({"display":"none"});var addTrigger;if(opts.extraTrigger){var theParent=org_image;for(var i=0;i<=opts.parentSteps;i++){theParent=theParent.parent()}addTrigger=theParent.find(opts.extraTrigger)}org_image.add(addTrigger).hover(function(){var margin_top=org_image.css("marginTop").slice(0,-2);var margin_bottom=org_image.css("marginLeft").slice(0,-2);var margin_left=org_image.css("marginLeft").slice(0,-2);var margin_right=org_image.css("marginLeft").slice(0,-2);if(margin_top<0||margin_bottom<0||margin_left<0||margin_right<0){var parent_ele=$(org_image);var parentEls=$(org_image).parents();$(parentEls).each(function(){if(this.tagName=="BODY"){return false}else if($(this).css("overflow")=="hidden"){parent_ele=$(this);return false}});var offset=parent_ele.offset();var parent_border_top=parseInt(parent_ele.css("border-top-width"));var parent_border_left=parseInt(parent_ele.css("border-left-width"))}else{var offset=org_image.offset();var parent_border_top=parseInt(org_image.css("border-top-width"));var parent_border_left=parseInt(org_image.css("border-left-width"))}if(!parent_border_top){parent_border_top=0}if(!parent_border_left){parent_border_left=0}var displayFlag=false;$("div.fullsize-icon").each(function(){if(parseInt($(this).css("top"))==(offset.top+opts.iconOffset+parent_border_top)&&parseInt($(this).css("left"))==(offset.left+opts.iconOffset+parent_border_left)){displayFlag=true;curIcon=$(this)}});if(displayFlag==false){$(icon).css({"top":offset.top+opts.iconOffset+parent_border_top,"left":offset.left+opts.iconOffset+parent_border_left});$("body").prepend(icon)}$(icon).show();},function(){$(icon).hide();});$(icon).hover(function(){$(this).show()},function(){$(this).hide()});$(icon).click(function(){opts.start.call(this);$("div.fullsize-wrapper, div.fullsize-sh-wrap").remove();var win_w=$(window).width();var win_h=$(window).height();var scrolltop=$(window).scrollTop();var scrollleft=$(window).scrollLeft();if(!$.support.opacity&&parseInt($.browser.version.substr(0,1))<"8"){var loading_left=(((win_w-opts.leftOffset)/2)+scrollleft)-25;var loading_top=(((win_h-opts.topOffset)/2)+scrolltop)-25}else{var loading_left=(((win_w+opts.leftOffset)/2)+scrollleft)-25;var loading_top=(((win_h+opts.topOffset)/2)+scrolltop)-25}var full_loading=$("<div></div>").addClass('fullsize-loading').css({"margin-left":loading_left,"margin-top":loading_top});var full_loading_inner=$("<div></div>").addClass('fullsize-loading-inner');$(full_loading).prepend(full_loading_inner);$("body").prepend(full_loading);var full_img=new Image();$(full_img).load(function(){$(this).hide();var new_offset=org_image.offset();img_w=this.width;img_h=this.height;aspect=img_w/img_h;if(((img_w+opts.leftOffset)+32)>win_w){img_w=(win_w-opts.leftOffset)-32;img_h=img_w/aspect}if(((img_h+opts.topOffset)+36)>win_h){img_h=(win_h-opts.topOffset)-36;img_w=img_h*aspect}if(!$.support.opacity&&parseInt($.browser.version.substr(0,1))<"8"){var img_left=Math.round((((win_w-opts.leftOffset)-img_w)/2)+scrollleft);var img_top=Math.round((((win_h-opts.topOffset)-img_h)/2)+scrolltop)}else{var img_left=Math.round((((win_w+opts.leftOffset)-img_w)/2)+scrollleft);var img_top=Math.round((((win_h+opts.topOffset)-img_h)/2)+scrolltop)}if(img_left<0){img_left=0}if(img_top<0){img_top=0}$(this).css({"height":org_image.height()+"px","width":org_image.width()+"px"});$("div.fullsize-loading").remove();var full_wrap=$("<div></div>").addClass("fullsize-wrapper").css({"display":"none","margin-top":new_offset.top,"margin-left":new_offset.left});$(full_wrap).prepend(this);if(img_title!=""||opts.forceTitleBar==true){var full_close=$("<a></a>").addClass("fullsize-close");var full_title=$("<div></div>").addClass("fullsize-title").css({"max-width":img_w});var full_title_text=$("<div></div>").addClass("fullsize-title-text").text(img_title);$(full_title).prepend(full_close);$(full_title).prepend(full_title_text);$(full_wrap).prepend(full_title);$("body").prepend(full_wrap);if(img_top!=0){img_top=img_top-12}}else{$(this).addClass("fullsize-close");$("body").prepend(full_wrap)}if(opts.shadow==true){if($.browser.safari||($.browser.mozilla&&$.browser.version.substr(0,5)>="1.9.1")){$(full_wrap).css({"-webkit-box-shadow":"0 2px 16px #000","-moz-box-shadow":"0 2px 16px #000","box-shadow":"0 2px 16px #000"})}else{var full_sh_wrap=$("<div></div>").addClass("fullsize-sh-wrap").css({"display":"none","width":org_image.width(),"margin-top":new_offset.top,"margin-left":new_offset.left});var full_sh_top=$("<div></div>").addClass("fullsize-sh-top");var full_sh_top_left=$("<div></div>").addClass("fullsize-sh-top-l");var full_sh_top_middle=$("<div></div>").addClass("fullsize-sh-top-m");var full_sh_top_right=$("<div></div>").addClass("fullsize-sh-top-r");$(full_sh_top).append(full_sh_top_left).append(full_sh_top_right).append(full_sh_top_middle);$(full_sh_wrap).prepend(full_sh_top);var full_sh_body=$("<div></div>").addClass("fullsize-sh-body");var full_sh_body_r=$("<div></div>").addClass("fullsize-sh-body-r");$(full_sh_body).append(full_sh_body_r);$(full_sh_wrap).append(full_sh_body);var full_sh_bottom=$("<div></div>").addClass("fullsize-sh-bottom");var full_sh_bottom_left=$("<div></div>").addClass("fullsize-sh-bottom-l");var full_sh_bottom_middle=$("<div></div>").addClass("fullsize-sh-bottom-m");var full_sh_bottom_right=$("<div></div>").addClass("fullsize-sh-bottom-r");$(full_sh_bottom).append(full_sh_bottom_left).append(full_sh_bottom_right).append(full_sh_bottom_middle);$(full_sh_wrap).append(full_sh_bottom);$("body").prepend(full_sh_wrap);$(full_sh_body).animate({height:parseInt(full_wrap.height())+img_h-22},{queue:false,duration:opts.zoomInSpeed});$(full_sh_wrap).fadeIn(opts.fadeInSpeed).animate({height:parseInt(full_wrap.height())+img_h+22,width:img_w+22,marginTop:img_top-9,marginLeft:img_left-11},{queue:false,duration:opts.zoomInSpeed})}}$(this).fadeIn(opts.fadeInSpeed).animate({height:img_h,width:img_w},{queue:false,duration:opts.zoomInSpeed});$(full_wrap).fadeIn(opts.fadeInSpeed).animate({width:img_w,marginTop:img_top,marginLeft:img_left},{queue:false,duration:opts.zoomInSpeed});$(".fullsize-close").click(function(){closeFullsize(full_img,full_wrap,org_image,$(this))})}).attr("src",img_src).addClass("fullsize-image")});function closeFullsize(full_img,full_wrap,org_image,ele){var offsets=org_image.offset();$(full_img).fadeOut(opts.fadeOutSpeed).animate({height:org_image.height(),width:org_image.width()},{queue:false,duration:opts.zoomOutSpeed});if(opts.shadow==true){$("div.fullsize-sh-wrap").remove()}$(full_wrap).fadeOut(opts.fadeOutSpeed).animate({width:org_image.width(),marginTop:offsets.top,marginLeft:offsets.left},{queue:false,duration:opts.zoomOutSpeed,complete:function(){ele.remove()}});opts.end.call(this)}}}})}})(jQuery);(function(a){a.fn.jNice=function(){var b=a.browser.safari;a(document).mousedown(l);return this.each(function(){a("input:submit, input:reset, input:button",this).each(m);a("button").focus(function(){a(this).addClass("jNiceFocus")}).blur(function(){a(this).removeClass("jNiceFocus")});b&&a(".jNiceInputWrapper").each(function(){a(this).addClass("jNiceSafari").find("input").css("width",a(this).width()+11)});a("input:checkbox",this).each(n);a("input:radio",this).each(o);a("select",this).each(function(c){i(this,c)});a(this).bind("reset",function(){window.setTimeout(function(){p(this)},10)});a(".jNiceHidden").css({opacity:0})})};var p=function(b){var c;a(".jNiceSelectWrapper select",b).each(function(){c=this.selectedIndex<0?0:this.selectedIndex;a("ul",a(this).parent()).each(function(){a("a:eq("+c+")",this).click()})});a("a.jNiceCheckbox, a.jNiceRadio",b).removeClass("jNiceChecked");a("input:checkbox, input:radio",b).each(function(){this.checked&&a("a",a(this).parent()).addClass("jNiceChecked")})},o=function(){var b=a(this).addClass("jNiceHidden").wrap('<span class="jRadioWrapper jNiceWrapper"></span>'),c=b.parent(),d=a('<span class="jNiceRadio"></span>');c.prepend(d);d.click(function(){var e=a(this).addClass("jNiceChecked").siblings("input").attr("checked",true);a('input:radio[name="'+e.attr("name")+'"]').not(e).each(function(){a(this).attr("checked",false).siblings(".jNiceRadio").removeClass("jNiceChecked")});return false});b.click(function(){if(this.checked){var e=a(this).siblings(".jNiceRadio").addClass("jNiceChecked").end();a('input:radio[name="'+e.attr("name")+'"]').not(e).each(function(){a(this).attr("checked",false).siblings(".jNiceRadio").removeClass("jNiceChecked")})}}).focus(function(){d.addClass("jNiceFocus")}).blur(function(){d.removeClass("jNiceFocus")});this.checked&&d.addClass("jNiceChecked")},n=function(){var b=a(this).addClass("jNiceHidden").wrap('<span class="jNiceWrapper"></span>'),c=b.parent().append('<span class="jNiceCheckbox"></span>'),d=c.find(".jNiceCheckbox").click(function(){var e=a(this),f=e.siblings("input")[0];if(f.checked===true){f.checked=false;e.removeClass("jNiceChecked")}else{f.checked=true;e.addClass("jNiceChecked")}return false});b.click(function(){this.checked?d.addClass("jNiceChecked"):d.removeClass("jNiceChecked")}).focus(function(){d.addClass("jNiceFocus")}).blur(function(){d.removeClass("jNiceFocus")});this.checked&&a(".jNiceCheckbox",c).addClass("jNiceChecked")},m=function(){var b=a(this).attr("value");a(this).replaceWith('<button id="'+this.id+'" name="'+this.name+'" type="'+this.type+'" class="'+this.className+'" value="'+b+'"><span><span>'+b+"</span></span>")},j=function(){a(".jNiceSelectWrapper ul:visible").hide()},l=function(b){a(b.target).parents(".jNiceSelectWrapper").length===0&&j()},i=function(b,c){var d=a(b);c=(c=c||d.css("zIndex")*1)?c:0;d.wrap(a('<div class="jNiceWrapper"></div>').css({zIndex:100-c}));var e=d.width();d.addClass("jNiceHidden").after('<div class="jNiceSelectWrapper"><div><span class="jNiceSelectText"></span><span class="jNiceSelectOpen"></span></div><ul></ul></div>');var f=a(b).siblings(".jNiceSelectWrapper").css({width:e+"px"});a(".jNiceSelectText, .jNiceSelectWrapper ul",f).width(e-a(".jNiceSelectOpen",f).width());a.browser.msie&&jQuery.browser.version<7&&d.after(a('<iframe src="javascript:\'\';" marginwidth="0" marginheight="0" align="bottom" scrolling="no" tabIndex="-1" frameborder="0"></iframe>').css({height:d.height()+4+"px"}));k(b);a("div",f).click(function(){var h=a(this).siblings("ul");h.css("display")=="none"&&j();h.slideToggle();var g=a("a.selected",h).offset().top-h.offset().top;h.animate({scrollTop:g});return false});d.keydown(function(h){var g=this.selectedIndex;switch(h.keyCode){case 40:if(g<this.options.length-1)g+=1;break;case 38:if(g>0)g-=1;break;default:return}a("ul a",f).removeClass("selected").eq(g).addClass("selected");a("span:eq(0)",f).html(a("option:eq("+g+")",d).attr("selected","selected").text());return false}).focus(function(){f.addClass("jNiceFocus")}).blur(function(){f.removeClass("jNiceFocus")})},k=function(b){var c=a(b),d=c.siblings(".jNiceSelectWrapper"),e=d.find("ul").find("li").remove().end().hide();a("option",c).each(function(f){e.append('<li><a href="#" index="'+f+'">'+this.text+"</a></li>")});e.find("a").click(function(){a("a.selected",d).removeClass("selected");a(this).addClass("selected");if(c[0].selectedIndex!=a(this).attr("index")&&c[0].onchange){c[0].selectedIndex=a(this).attr("index");c[0].onchange()}c[0].selectedIndex=a(this).attr("index");a("span:eq(0)",d).html(a(this).html());e.hide();return false});a("a:eq("+c[0].selectedIndex+")",e).click()},q=function(b){var c=a(b).siblings(".jNiceSelectWrapper").css("zIndex");a(b).css({zIndex:c}).removeClass("jNiceHidden");a(b).siblings(".jNiceSelectWrapper").remove()};a.jNice={SelectAdd:function(b,c){i(b,c)},SelectRemove:function(b){q(b)},SelectUpdate:function(b){k(b)}};a(function(){a("form.jNice").jNice()})})(jQuery);(function(b){b.fn.lightBox=function(a){function o(){p(this,q);return false}function p(c,d){b("embed, object, select").css({visibility:"hidden"});r();a.imageArray.length=0;a.activeImage=0;if(d.length==1)a.imageArray.push(new Array(c.getAttribute("href"),c.getAttribute("title")));else for(var e=0;e<d.length;e++)a.imageArray.push(new Array(d[e].getAttribute("href"),d[e].getAttribute("title")));for(;a.imageArray[a.activeImage][0]!=c.getAttribute("href");)a.activeImage++;g()}function r(){b("body").append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="'+a.imageLoading+'"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="'+a.imageBtnClose+'"></a></div></div></div></div>');var c=i();b("#jquery-overlay").css({backgroundColor:a.overlayBgColor,opacity:a.overlayOpacity,width:c[0],height:c[1]}).fadeIn();var d=j();b("#jquery-lightbox").css({top:d[1]+c[3]/10,left:d[0]}).show();b("#jquery-overlay,#jquery-lightbox").click(function(){h()});b("#lightbox-loading-link,#lightbox-secNav-btnClose").click(function(){h();return false});b(window).resize(function(){var e=i();b("#jquery-overlay").css({width:e[0],height:e[1]});var f=j();b("#jquery-lightbox").css({top:f[1]+e[3]/10,left:f[0]})})}function g(){b("#lightbox-loading").show();a.fixedNavigation?b("#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide():b("#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber").hide();var c=new Image;c.onload=function(){b("#lightbox-image").attr("src",a.imageArray[a.activeImage][0]);s(c.width,c.height);c.onload=function(){}};c.src=a.imageArray[a.activeImage][0]}function s(c,d){var e=b("#lightbox-container-image-box").width(),f=b("#lightbox-container-image-box").height(),k=c+a.containerBorderSize*2,l=d+a.containerBorderSize*2;e=e-k;f=f-l;b("#lightbox-container-image-box").animate({width:k,height:l},a.containerResizeSpeed,function(){t()});if(e==0&&f==0)b.browser.msie?m(250):m(100);b("#lightbox-container-image-data-box").css({width:c});b("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({height:d+a.containerBorderSize*2})}function t(){b("#lightbox-loading").hide();b("#lightbox-image").fadeIn(function(){u();v()});w()}function u(){b("#lightbox-container-image-data-box").slideDown("fast");b("#lightbox-image-details-caption").hide();a.imageArray[a.activeImage][1]&&b("#lightbox-image-details-caption").html(a.imageArray[a.activeImage][1]).show();a.imageArray.length>1&&b("#lightbox-image-details-currentNumber").html(a.txtImage+" "+(a.activeImage+1)+" "+a.txtOf+" "+a.imageArray.length).show()}function v(){b("#lightbox-nav").show();b("#lightbox-nav-btnPrev,#lightbox-nav-btnNext").css({background:"transparent url("+a.imageBlank+") no-repeat"});if(a.activeImage!=0)a.fixedNavigation?b("#lightbox-nav-btnPrev").css({background:"url("+a.imageBtnPrev+") left 15% no-repeat"}).unbind().bind("click",function(){a.activeImage-=1;g();return false}):b("#lightbox-nav-btnPrev").unbind().hover(function(){b(this).css({background:"url("+a.imageBtnPrev+") left 15% no-repeat"})},function(){b(this).css({background:"transparent url("+a.imageBlank+") no-repeat"})}).show().bind("click",function(){a.activeImage-=1;g();return false});if(a.activeImage!=a.imageArray.length-1)a.fixedNavigation?b("#lightbox-nav-btnNext").css({background:"url("+a.imageBtnNext+") right 15% no-repeat"}).unbind().bind("click",function(){a.activeImage+=1;g();return false}):b("#lightbox-nav-btnNext").unbind().hover(function(){b(this).css({background:"url("+a.imageBtnNext+") right 15% no-repeat"})},function(){b(this).css({background:"transparent url("+a.imageBlank+") no-repeat"})}).show().bind("click",function(){a.activeImage+=1;g();return false});x()}function x(){b(document).keydown(function(c){y(c)})}function n(){b(document).unbind()}function y(c){if(c==null){keycode=event.keyCode;escapeKey=27}else{keycode=c.keyCode;escapeKey=c.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if(key==a.keyToClose||key=="x"||keycode==escapeKey)h();if(key==a.keyToPrev||keycode==37)if(a.activeImage!=0){a.activeImage-=1;g();n()}if(key==a.keyToNext||keycode==39)if(a.activeImage!=a.imageArray.length-1){a.activeImage+=1;g();n()}}function w(){if(a.imageArray.length-1>a.activeImage){objNext=new Image;objNext.src=a.imageArray[a.activeImage+1][0]}if(a.activeImage>0){objPrev=new Image;objPrev.src=a.imageArray[a.activeImage-1][0]}}function h(){b("#jquery-lightbox").remove();b("#jquery-overlay").fadeOut(function(){b("#jquery-overlay").remove()});b("embed, object, select").css({visibility:"visible"})}function i(){var c,d;if(window.innerHeight&&window.scrollMaxY){c=window.innerWidth+window.scrollMaxX;d=window.innerHeight+window.scrollMaxY}else if(document.body.scrollHeight>document.body.offsetHeight){c=document.body.scrollWidth;d=document.body.scrollHeight}else{c=document.body.offsetWidth;d=document.body.offsetHeight}var e,f;if(self.innerHeight){e=document.documentElement.clientWidth?document.documentElement.clientWidth:self.innerWidth;f=self.innerHeight}else if(document.documentElement&&document.documentElement.clientHeight){e=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else if(document.body){e=document.body.clientWidth;f=document.body.clientHeight}pageHeight=d<f?f:d;pageWidth=c<e?c:e;return arrayPageSize=new Array(pageWidth,pageHeight,e,f)}function j(){var c,d;if(self.pageYOffset){d=self.pageYOffset;c=self.pageXOffset}else if(document.documentElement&&document.documentElement.scrollTop){d=document.documentElement.scrollTop;c=document.documentElement.scrollLeft}else if(document.body){d=document.body.scrollTop;c=document.body.scrollLeft}return arrayPageScroll=new Array(c,d)}function m(c){var d=new Date;do var e=new Date;while(e-d<c)}a=jQuery.extend({overlayBgColor:"#000",overlayOpacity:0.8,fixedNavigation:false,imageLoading:"/images/lightbox-ico-loading.gif",imageBtnPrev:"/images/lightbox-btn-prev.gif",imageBtnNext:"/images/lightbox-btn-next.gif",imageBtnClose:"/images/lightbox-btn-close.gif",imageBlank:"/images/lightbox-blank.gif",containerBorderSize:10,containerResizeSpeed:400,txtImage:"Image",txtOf:"of",keyToClose:"c",keyToPrev:"p",keyToNext:"n",imageArray:[],activeImage:0},a);var q=this;return this.unbind("click").click(o)}})(jQuery);jQuery.extend(jQuery.browser,{flash:(function(){var found=false;try{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/flash/gim)){found=true;return false;}});}
return found;})(),sl:(function(){var found=false;try{new ActiveXObject("AgControl.AgControl");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/silverlight/gim)){found=true;return false;}});}
return found;})(),pdf:(function(){var found=false;try{(new ActiveXObject("AcroPDF.PDF")||new ActiveXObject("PDF.PdfCtrl"));found=true;}catch(e){jQuery.each(navigator.mimeTypes,function(){if(this.suffixes.match(/pdf/gim)){found=true;return false;}});}
return found;})(),java:(function(){return navigator.javaEnabled();})(),qtime:(function(){var found=false;try{new ActiveXObject("QuickTime.QuickTime");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/quicktime/gim)){found=true;return false;}});}
return found;})(),wmp:(function(){var found=false;try{new ActiveXObject("WMPlayer.OCX");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/(windows\smedia)|(Microsoft)/gim)){found=true;return false;}});}
return found;})(),shk:(function(){var found=false;try{new ActiveXObject("SWCtl.SWCtl");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/shockwave/gim)&&!this.name.match(/flash/gim)){found=true;return false;}});}
return found;})(),rp:(function(){var found=false;try{new ActiveXObject("RealPlayer");found=true;}catch(e){jQuery.each(navigator.plugins,function(){if(this.name.match(/realplayer/gim)){found=true;return false;}});}
return found;})()});
function playRadio(){plugin=detectRadioPlugin();$j.get("/radio/play/",{embed:plugin,noLayout:"true"},function(d){$j("#playerRadio").html(d);});}
function stopRadio(){plugin=detectRadioPlugin();$j("#playerRadio").html("");}
function detectRadioPlugin(){if(jQuery.browser.wmp){return"wp";}if(jQuery.browser.rp){return"rm";}if(jQuery.browser.qtime){return"qt";}else{var info="Pour pouvoir Ã©couter la Web Radio, vous devez installer Real Player, Windows Media Player ou QuickTime";afficheNotification(info);return false;}}
function refreshRadio(){
	jQuery.getJSON("http://static.yabiladi.com/refreshRadio.php?callback=?", 
			function(data) {
 
		var title = unescape(data.title);
		var cover = unescape(data.cover);
		setRadioTitle(title);
		setRadioCover(cover);
		if (data.id) {
			changeRadioButton(data.id, data.songMin, unescape(data.name));
		} else {
			changeRadioButton(false ,"","");
		}
		$j("#inf_mp").html(decodeURIComponent(escape(unescape(data.mp_notif))));
		$j("#inf_mev_messagev").html(decodeURIComponent(escape(unescape(data.mnv_notif))));
		$j("#inf_mev_editn").html(decodeURIComponent(escape(unescape(data.mev_notif))));
		createLink('div.content-info-bulle');
	});
}
function setRadioTitle(title){$j('#radioTitle').html(title);}
function setRadioCover(cover){$j('#radioCover').html(cover);}
function changeRadioButton(songId,songMin,songName){$j("#dediLink").unbind("click");$j("#flopLink").unbind("click");$j("#topLink").unbind("click");$j("#dediLink").attr("onclick","");$j("#flopLink").attr("onclick","");$j("#topLink").attr("onclick","");if(songId){$j("#flopLink").show();$j("#topLink").show();if(songMin>9){$j("#dediLink").attr("title","");$j("#dediLink").hide();}else{$j("#dediLink").bind("click",function(){addDedicace(songId);});$j("#dediLink").show();$j("#dediLink").attr("title","D\351dicacez "+songName);}
$j("#topLink").bind("click",function(){voteSong('top',songId);});$j("#topLink").attr("title","Vous aimez "+songName);$j("#flopLink").bind("click",function(){voteSong('flop',songId);});$j("#flopLink").attr("title","Vous n'aimez pas "+songName);}else{$j("#dediLink").attr("title","");$j("#flopLink").attr("title","");$j("#topLink").attr("title","");$j("#dediLink").hide();$j("#flopLink").hide();$j("#topLink").hide();}}
function voteSong(type,id){$j.post('/radio/vote/'+type+'/'+id,{type:type,id:id,noLayout:"true"},function(data){if(data=="true"){afficheNotification('Merci. Votre vote a bien Ã©tÃ© pris en compte');}else{if(data=="false"){getLogged();}else{afficheNotification("Vous avez dÃ©ja votÃ©");}}});}
function addDedicace(id){$j('html, body').animate({scrollTop:0},'slow');WaitingContact();$j.get('/radio/adddedicace',{idsong:id,noLayout:"true"},function(data){recalculatePosition('#dialog2',510,294);$j("#dialog2").html(data);});return false;}
$j(document).ready(function(){if(navigation=="AJAX"){$j.historyInit(pageload);}});
function showKeyboard() {
	$j('html, body').animate({scrollTop:0}, 'slow');
	WaitingContact();
	recalculatePosition("#dialog2",605,404);
	$j.get('/clavier/light', null, function(data) {
		$j("#dialog2").html(data);
		document.onkeydown = function(e){
			  if (e == null) {
			    keycode = event.keyCode;
			  } else {
			    keycode = e.which;
			  } 
			  if(keycode == 27){
				  closeEffect();
			  } 
		}	
	});
	return false;
}
function addFriend(id) {
	$j.post('/im/addfriend', {friend:id}, function(data) {
		if(data != "") {
			afficheNotification(data);
		}
	});
}
function signalercomment(id){$j('html, body').animate({scrollTop:0}, 'slow');WaitingContact();recalculatePosition("#dialog2",360,414);$j.post('/comments/signaler',{id: id},function (data){$j('#dialog2').html(data);});return false;}
(function($){$.fn.jCarouselLite=function(o){o=$.extend({btnPrev:null,btnNext:null,btnGo:null,mouseWheel:false,auto:null,speed:200,easing:null,vertical:false,circular:true,visible:3,start:0,scroll:1,beforeStart:null,afterEnd:null},o||{});return this.each(function(){var b=false,animCss=o.vertical?"top":"left",sizeCss=o.vertical?"height":"width";var c=$(this),ul=$("ul",c),tLi=$("li",ul),tl=tLi.size(),v=o.visible;if(o.circular){ul.prepend(tLi.slice(tl-v-1+1).clone()).append(tLi.slice(0,v).clone());o.start+=v}var f=$("li",ul),itemLength=f.size(),curr=o.start;c.css("visibility","visible");f.css({overflow:"hidden",float:o.vertical?"none":"left"});ul.css({margin:"0",padding:"0",position:"relative","list-style-type":"none","z-index":"1"});c.css({overflow:"hidden",position:"relative","z-index":"2",left:"0px"});var g=o.vertical?height(f):width(f);var h=g*itemLength;var j=g*v;f.css({width:f.width(),height:f.height()});ul.css(sizeCss,h+"px").css(animCss,-(curr*g));c.css(sizeCss,j+"px");if(o.btnPrev)$(o.btnPrev).click(function(){return go(curr-o.scroll)});if(o.btnNext)$(o.btnNext).click(function(){return go(curr+o.scroll)});if(o.btnGo)$.each(o.btnGo,function(i,a){$(a).click(function(){return go(o.circular?o.visible+i:i)})});if(o.mouseWheel&&c.mousewheel)c.mousewheel(function(e,d){return d>0?go(curr-o.scroll):go(curr+o.scroll)});if(o.auto)setInterval(function(){go(curr+o.scroll)},o.auto+o.speed);function vis(){return f.slice(curr).slice(0,v)};function go(a){if(!b){if(o.beforeStart)o.beforeStart.call(this,vis());if(o.circular){if(a<=o.start-v-1){ul.css(animCss,-((itemLength-(v*2))*g)+"px");curr=a==o.start-v-1?itemLength-(v*2)-1:itemLength-(v*2)-o.scroll}else if(a>=itemLength-v+1){ul.css(animCss,-((v)*g)+"px");curr=a==itemLength-v+1?v+1:v+o.scroll}else curr=a}else{if(a<0||a>itemLength-v)return;else curr=a}b=true;ul.animate(animCss=="left"?{left:-(curr*g)}:{top:-(curr*g)},o.speed,o.easing,function(){if(o.afterEnd)o.afterEnd.call(this,vis());b=false});if(!o.circular){$(o.btnPrev+","+o.btnNext).removeClass("disabled");$((curr-o.scroll<0&&o.btnPrev)||(curr+o.scroll>itemLength-v&&o.btnNext)||[]).addClass("disabled")}}return false}})};function css(a,b){return parseInt($.css(a[0],b))||0};function width(a){return a[0].offsetWidth+css(a,'marginLeft')+css(a,'marginRight')};function height(a){return a[0].offsetHeight+css(a,'marginTop')+css(a,'marginBottom')}})(jQuery);
