(function($) {
	$.fn.customFadeIn = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	$.fn.customFadeOut = function(speed, callback) {
		$(this).fadeOut(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
	/*$.fn.cshow = function(speed, callback) {
		$(this).show(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};*/
	$.fn.cshow = function(speed, callback) {
		if(jQuery.browser.msie) {
			$(this).show();
		}
		else {
			$(this).show(speed, function() {		
				if(callback != undefined)
					callback();
			});
		}
	};
	$.fn.chide = function(speed, callback) {
		if(jQuery.browser.msie) {
			$(this).hide();
		}
		else {
			$(this).hide(speed, function() {		
				if(callback != undefined)
					callback();
			});
		}
	};
	
	$.fn.ieshow = function(speed, callback) {
		$(this).fadeIn(speed, function() {
			if(jQuery.browser.msie)
				$(this).get(0).style.removeAttribute('filter');
			if(callback != undefined)
				callback();
		});
	};
})(jQuery);

jQuery.cookie = function(name, value, expiredays) {
    if (typeof value != 'undefined') { // name and value given, set cookie
		var exdate=new Date();
		exdate.setDate(exdate.getDate()+expiredays);
		document.cookie=name+ "=" +escape(value) +	((expiredays==null) ? "" : ";expires="+exdate.toGMTString());
    } else { // only name given, get cookie
		if (document.cookie.length>0) {
			c_start=document.cookie.indexOf(name + "=");
			if (c_start!=-1) { 
				c_start=c_start + name.length+1; 
				c_end=document.cookie.indexOf(";",c_start);
				if (c_end==-1) c_end=document.cookie.length;
				return unescape(document.cookie.substring(c_start,c_end));
			} 
		}
        return "";
    }
};