/*** LE RETOUR DE CUSTOM.JS ***/

$(document).ready(function() {
	
	if(bVersion == "explorer6" || bVersion =="explorer7") {
		$("a[rel='colorbox']").colorbox({width:"710", height:"477", iframe:true});
	}else{
		$("a[rel='colorbox']").colorbox({width:"710", height:"447", iframe:true});
	}
	
	
	$('div.main_text a img').each(function() {
		$(this).parent('a').attr('rel', 'colorpix');
	});
	
	$("a[rel='colorpix']").colorbox({maxWidth:"90%"});
	
	if(bVersion == "explorer6") {
		$('div.menu_principal ul li').hover(function() {
			$(this).children('ul:hidden').show();
			}, function() {
			$(this).children('ul:visible').hide();
		});
	}else{
	
	$('div.menu_principal ul li').hover(function() {
		//$(this).children('ul:hidden').slideDown('fast');
		$(this).children('ul:hidden').show();
		}, function() {
		$(this).children('ul:visible').hide();
		//$(this).children('ul:visible').fadeOut('fast');
	});
	
	}
	
	$('div.menu_principal ul li').each(function() {
		if($(this).children('ul').size() > 0) {
			$(this).addClass('nolink');
		}
	});
	
	$('div.menu_principal ul>li.nolink>a').click(function() {
		return false;
	});
	
	$("div.faq a").click(function (){
		href = $(this).attr("href");
		href = href.substring(1);
		element = $('a[name="'+ href + '"]');
		$.scrollTo(element,500);
		return false;
	});
	
});
