$(function () {
    jQuery(document).ready(function() {
	jQuery('.first-and-second-carousel').jcarousel({
	scroll: 1});
	}); 
	//main menu
	$('#menu > li').hover(function() {
		$(this).addClass('hov');
		$(this).find('ul').show();
	}, function() {
		$(this).removeClass('hov');
		$(this).find('ul').hide();
	});
    // suggestions
	$('.submit').css('cursor' , 'pointer');
	//tarifs tables
	$('.tarifsButtons a').bind('click', function() {
		var teq = $(this).index();
		$('.tarifsButtons a').removeClass('active').eq(teq).addClass('active');
		$('.tarifsTbl .tarifsTbls').hide().eq(teq).show();

		return false;
	});

	$('#letterSw a').bind('click', function() {
		var anm = $(this).attr('href').substr(1,4);
		$('#letterSw a.active').removeClass('active');
		$(this).addClass('active');
		$('.tarifsTbl .tarifsTbls table:visible').hide();
		$('.tarifsTbl .' + anm).show();

		return false;
	});

	/*var rlb  = $('#reqBg, #req');
	var rfrm = $('#req_form');
	var rmsg = $('#req_message');
	$('#onlineReq, .onlineReqFooter').bind('click', function() {
		rmsg.hide();
		rfrm.show();
		rlb.show();
		$('#reqBg').css({opacity: '0.5'});
		return false;
	});*/

	$('.close').bind('click', function() {
		rlb.hide();
		return false;
	});
	// calc services
	$('.calcHidden').click(function(){
		//$(this).css('display' , 'none');
		$(this).hide();
		$('#calc-block').css('display' , 'inline-block');
	});
	$('.calculator .ttl a[href="#close"]').click(function(){
		$('.calcHidden').show();
		$('#calc-block').hide();

		return false;
	});
	// img service

	$('.img-serv:eq(0)').css('background' , "url('/img/serviceone.png') no-repeat");
	$('.img-serv:eq(1)').css('background' , "url('/img/servicetwo.png') no-repeat");
	$('.img-serv:eq(2)').css('background' , "url('/img/servicetree.png') no-repeat");
	$('.img-serv:eq(3)').css('background' , "url('/img/servicefoor.png') no-repeat");
	$('.img-serv:eq(4)').css('background' , "url('/img/servicefive.png') no-repeat");
	$('.img-serv:eq(5)').css('background' , "url('/img/servicesix.png') no-repeat");


	$('.radioclass').change(function(){
		var selected = $('.LabelSelected :radio[name="'+$(this).attr('name')+'"]');

		if (selected.length > 0)
		{
			selected.parent().removeClass('LabelSelected');
		}

		$(this).parent().addClass('LabelSelected');
	});


});

