43 lines
1.6 KiB
JavaScript
Raw Normal View History

2011-06-30 15:30:43 +00:00
$(document).ready( function()
{
$('.idpr').on('click', function(){
2011-06-30 15:30:43 +00:00
//e.preventDefault();
var n = $(this).attr('id');
if ($('#p'+n).css('display')=='none'){
$('#p'+n).css('display', 'block');
} else {
$('#p'+n).css('display', 'none');
}
});
2013-05-23 13:42:00 +00:00
2011-08-30 07:11:39 +00:00
$('.tooltip').each(function(){
var title = $(this).attr('title');
var width = $(this).attr('wdth');
2011-08-23 15:20:02 +00:00
$(this).attr('title', '');
2011-08-30 07:11:39 +00:00
$(this).qtip({
solo:true,
2011-08-23 15:20:02 +00:00
content: title,
style: { width: width },
position: { at: "bottom center", my: "top center" }
2011-08-26 14:02:45 +00:00
});
});
2013-05-23 13:42:00 +00:00
$( "#radio" ).buttonset();
$('.radio').on('click', function() {
$('.lang_img').fadeOut();
$.alink = this.value.toLowerCase();
$.alink_h = this.value;
$(".idpr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+$('.lang0').text().substr($('.lang0').text().length - 2));
$(".lang").attr("src","/themes/default/images/drapeaux/"+$('.lang0').text().substr($('.lang0').text().length - 2)+".png");
$(".lang_val").val($('.lang0').text().substr($('.lang0').text().length - 2));
$('.'+$.alink+'').fadeIn(500);
});
$('select').on('change', function() {
$('.lang_img').fadeOut();
$(".idpr").attr("href","/giant/"+$.alink+"/Pays/"+location.pathname.match(/\/Pays\/([^\/]+)/)[1]+"/Type/"+$.alink_h+"/CompanyId/"+location.pathname.match(/\/CompanyId\/([^\/]+)/)[1]+"/Language/"+this.value);
$(".lang").attr("src","/themes/default/images/drapeaux/"+this.value+".png");
$('.'+$.alink+'').fadeIn(500);
});
2011-06-30 15:30:43 +00:00
});