﻿var ie6 = false;
 var opera = false;
 
 $(document).ready(function() {

    	jQuery.each(jQuery.browser, function(i, val) {
  		if(i=="msie" && jQuery.browser.version.substr(0,3)=="6.0")
     		ie6 = true;
     		if(i=="opera" && val == true)
     		opera = true;
	});
	
    
     $(".CS_email").each(function(){
    	try{

		var sEmail = $(this).text();
		sEmail = sEmail.replace("[at]","@").toLowerCase();
		$(this).hide();
		$(this).after('<a class="' + $(this).attr('class') + '" href="mailto:' + sEmail + '" title="End email to ' + sEmail + '">' + sEmail + '</a>');
		$(this).remove();
	}
	catch(e)
	{
	
	}

    });
    
   /* $('#wrapper a[href^=#]').click(function() {
	  
	 
		  if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'')
		    && location.hostname == this.hostname) {
		      var $target = $(this.hash);
		      $target = $target.length && $target 
		      || $('[name=' + this.hash.slice(1) +']');
		      if ($target.length) {
		        var targetOffset = $target.offset().top - 94;
		        $('html,body')
		        .animate({scrollTop: targetOffset},{duration: 1000, easing:'easeInSine'});
		       return false;
		      }
		    }
	
	     });
	     
*/

});



jQuery.fn.toggleText = function(a, b) {
      return this.each(function() {
        jQuery(this).text(jQuery(this).text() == a ? b : a);
      });
};