/**
 * @link http://www.web-solution-way.be/ 
 * @copyright clashdesign.be 2008 and web-solution-way.be
 * @author : Gérits Aurélien
 * @package : wizard
 * @version : 0.6 beta
 * @type : javascript
 * @library : jquery
 * @revision 20/11/2008
 */
/**
 * 
 * Global utility function and methode jquery
 */
/**The 1st line is most important, 
	if you do not hold with step to have conflict between Jquery and of another library to remove it not.
	*/
//jQuery.noConflict();
/**
 * jQuery ini global statement
 */
jQuery(document).ready(function() {
	/*
	* Event click for print devis
	*
	*/
	jQuery('a.print').click(function() { 
            jQuery.blockUI({
            	
            	message: jQuery('#question'), 
            	css: { width: '275px' } 
            });
            return false;
	});
	jQuery('#yes').click(function() {
		
		jQuery.jClashPrint('#wizardResult');
	}); 
 
     jQuery('#no').click(function() { 
         jQuery.unblockUI(); 
            return false; 
     }); 
	/**
	 * function for display message log
	 * return browser state in animate dom
	 */
	jQuery("div.reponse .msg").slideDown('slow',function(){
		
			jQuery(this).animate({backgroundColor:'#fbc808', color:'#A71602'}, 2000);
			
				   	},function() {
						
			jQuery(this).animate({backgroundColor:'#FFFFFF', color:'#444444'}, 2000);
			
	});
	jQuery("div.reponse .error").slideDown('slow',function(){
		
			jQuery(this).animate({backgroundColor:'#ff7979', color:'white'}, 2000);
			
				   	},function() {
						
			jQuery(this).animate({backgroundColor:'#FFFFFF', color:'#444444'}, 2000);
			
	});
	/**
	 * function event hover in button sendForms if remove attribute disabled
	 */
	var ie6 = (jQuery.browser.msie && jQuery.browser.version < 7);
	if(ie6){
		jQuery(".globalForm div#process #sendForms").hover(function () {
	      	jQuery(this).css({
				backgroundColor: 'orange',
				color: 'white',
				border: '1px solid grey',
				cursor: 'pointer'
			});
		    }, function () {
		    jQuery(this).css({
					backgroundColor: 'white',
					color: 'orange',
					border: '1px solid grey',
					fontWeight: 'bold'
		    });
		});
	}
	jQuery('#showAll').click(function(){
		
		var Answer = jQuery('.ChildQuest:gt(2), .SecondChildQuest:gt(2)'); 
		if (Answer.is(":visible")){
			
        	Answer.hide('slow');
			
      	}else{
			
			Answer.show('slow');
		}
	});
	jQuery('.infos').tooltip({
		track: true, 
	    delay: 0, 
	    showURL: false,
	    showBody: " - ",
	    extraClass: "pretty",
	    opacity: 0.8,
	    fade: 250,
		positionLeft: true
	});
	jQuery('#NumberFirstLanguagePage, #NumberSecondLanguagePage, #NumberThirdLanguagePage, #NumberFourthLanguagePage').tooltip({
		track: true, 
	    delay: 0, 
	    showURL: false,
		left: -120 
	});
	jQuery(':reset#reset').click(function(){
		jQuery('input[type=radio]').check("off");
		var url = 'http://www.web-solution-way.com/module'
		window.location.href = url;   		
	});
	
});