// Copyright Colt Interactive http://www.coltinteractive.com	

// On load 
jQuery(document).ready(function() {
	jQuery("#search-top input").DefaultValue("Search...");
	jQuery("#blog-subscribe input").DefaultValue("your email");
	jQuery("#search-top-fr input").DefaultValue("Recherche...");
	jQuery("#blog-subscribe-fr input").DefaultValue("votre courriel");
	
	// copyright year
	jQuery('#footer-year').html(new Date().getFullYear());

    });
	/// default input text
jQuery.fn.DefaultValue = function(text){
    return this.each(function(){
    //Make sure we're dealing with text-based form fields
    if(this.type != 'text' && this.type != 'password' && this.type != 'textarea')
      return;
    
    //Store field reference
    var fld_current=this;
    
    //Set value initially if none are specified
        if(this.value=='' || this.value == text) {
      this.value=text;
    } else {
      //Other value exists - ignore
      return;
    }
    
    //Remove values on focus
        jQuery(this).focus(function() {
      if(this.value==text || this.value=='')
        this.value='';
    });
    
    //Place values back on blur
        jQuery(this).blur(function() {
      if(this.value==text || this.value=='')
        this.value=text;
    });
    
    //Capture parent form submission
    //Remove field values that are still default
        jQuery(this).parents("form").each(function() {
      //Bind parent form submit
       jQuery(this).submit(function() {
        if(fld_current.value==text) {
          fld_current.value='';
        }
      });
    });
    });
};

(function($){
	$.fn.imgslide = function(options){
		// Declare default values
		var defaults = {
				top : '0px',
				right : '0px',
				bottom : '0px',
				left : '0px',
				duration : 200,
				easeIn : false,
				easeOut : false
			},
			// Override default values if options are passed in
			options = $.extend(defaults, options);
		// Loop through all images being called
		this.each(function(){
			// Declare variables
			var $this		= $(this),
				top 		= options.top,
				right		= options.right,
				bottom		= options.bottom,
				left		= options.left,
				duration	= options.duration,
				easeIn		= options.easeIn,
				easeOut		= options.easeOut;
			// If original value is 'auto' change to 0px. Needed for browsers other than Firefox	
			(($this).css('top') == 'auto')? defTop = '0px' : defTop = ($this).css('top');
			(($this).css('right') == 'auto')? defRight = '0px' : defRight = ($this).css('right');
			(($this).css('bottom') == 'auto')? defBottom = '0px' : defBottom = ($this).css('bottom');
			(($this).css('left') == 'auto')? defLeft = '0px' : defLeft = ($this).css('left');
			// Run animation when hovered
			$this.hover(function(){
				$($this).stop().animate({top:top,right:right,bottom:bottom,left:left},{queue:false,duration:duration,easing:easeIn});					 
			}, function(){
				$($this).stop().animate({top:defTop,right:defRight,bottom:defBottom,left:defLeft},{queue:false,duration:duration,easing:easeOut});					 
			});
		});
	// Ensure chainability	
	return this;
	}
})(jQuery);

$(document).ready(function(){

$('#fr-soon').hide();

$('a#fr-button').mouseenter(function(){
$('#fr-soon').fadeIn('fast');
});

$('a#fr-button').mouseleave(function(){
$('#fr-soon').fadeOut('fast');
})

});


