var isMSIE = /*@cc_on!@*/false;

$(function(){
	ZeroClipboard.setMoviePath( '/webmasters/js/ZeroClipboard.swf' );

	$('a.copyThis').each(function(){
		id = this.id.toString();
		var clip = new ZeroClipboard.Client();
		clip.setText( $.trim($('#'+id+'c').text()) );
		clip.glue( id );
	});


	var hardClick = function(){
		$('#listClips'+this.rel+' > div.hard').show();
		$('#listClips'+this.rel+' > div.soft').hide();
		$(this).addClass('active');
		$('a.soft[rel='+this.rel+']').removeClass('active');
	};
	
	var softClick = function(){
		$('#listClips'+this.rel+' > div.soft').show();
		$('#listClips'+this.rel+' > div.hard').hide();
		$(this).addClass('active');
		$('a.hard[rel='+this.rel+']').removeClass('active');
	};

	$('div.sstabs a.hard').click(hardClick);
	$('div.sstabs a.soft').click(softClick);
	
	var ex1Click = function(){
		$('div.exemple1').show();
		$('div.exemple2').hide();
		$(this).addClass('active');
		$('div.ex2').removeClass('active');
	};
	
	var ex2Click = function(){
		$('div.exemple2').show();
		$('div.exemple1').hide();
		$(this).addClass('active');
		$('div.ex1').removeClass('active');
	};

	$('div.bandeau .ex1').click(ex1Click);
	$('div.bandeau .ex2').click(ex2Click);
	
	if($('#profileBox')) {
		
		var msnInput = function(){
			if (this.value == '@') {
				this.value = '';
				$(this).removeClass('msnInput');
			}
		};
		
		$('#profileBox .close').click(function(){
			$('#profileBox, #overlay').hide();
		});
		
		
		$('#msnInput').click(msnInput);
		$('#msnInput').focus(msnInput);
		
	}

});