/*!
 * slideNswap Plugin for jQuery
 *
 * @author Asaf Zamir
 * @link http://jquery.kidsil.net
 * @version 0.01
 * @date 31/03/2011
 *
 * Description:
 * create a custom cursor for any element, no more .cur files
 * that may or may not work!
 * 
 * Usage:
 * just call customcursor($('body'),'image.jpg');
 * to make the custom cursor on the entire body, or choose another element
 * as you wish.
 * 
 * important footnote: this isn't perfect, I this it might be the rendering
 * of the browser, because I have had better experience with Chrome, and for 
 * some reason it was better moving sideways than up and down, but hey, it works :)
 * an example is available at http://jquery.kidsil.net
 */

function customcursor(element,imgUrl) {
	jQuery('body').append('<img style="position:absolute;display:none;cursor:none;" id="mycursor" src="'+imgUrl+'" />');
	element.css('cursor','none');
	jQuery(element).hover(function() {
		jQuery('#mycursor').show();
	},function() {
		jQuery('#mycursor').hide();		
	});
	jQuery(element).mousemove(function(e){
			jQuery('#mycursor').css('top', e.clientY).css('left', e.clientX);
	});
}
function customcursor2(element,imgUrl) {
	jQuery('body').append('<img style="position:absolute;display:none;cursor:none;" id="mycursor2" src="'+imgUrl+'" />');
	element.css('cursor','none');
	jQuery(element).hover(function() {
		jQuery('#mycursor2').show();
	},function() {
		jQuery('#mycursor2').hide();		
	});
	jQuery(element).mousemove(function(e){
			jQuery('#mycursor2').css('top', e.clientY).css('left', e.clientX);
	});
}/*
(function($) {

    $.fn.ImageFollowMouse = function(params) {

        params = $.extend({ src: null, width: null, height: null, topY: null, leftX: null, backgroundColor: null, Padding: null, MyClassUses: 'ClassID' }, params);

        this.each(function() {

            var imgWidth;
            var imgHeight;
            var $t = $(this);
            var X = 20;
            var Y = 20;
            var bColor = 'fff';
            var iPadding = '8px';
			var MyClassUses = params.MyClassUses;

            $("<img id='ThisISImageFollowMouseImage"+ MyClassUses +"' />").attr({ src: params.src }).prependTo('body');
            $("#ThisISImageFollowMouseImage"+ MyClassUses +"")
            .addClass("ThisISImageFollowMouseImage"+ MyClassUses +"")
            .css('position', 'absolute')
            .css('visibility', 'hidden')
            ;
            if (params.width != null) {
                imgWidth = params.width;
                $("#ThisISImageFollowMouseImage"+ MyClassUses +"").css('width', imgWidth);
            }
            if (params.height != null) {
                imgHeight = params.height;
                $("#ThisISImageFollowMouseImage"+ MyClassUses +"").css('height', imgHeight);
            }


            if (params.topY != null) X = params.topY;
            if (params.leftX != null) Y = params.leftX;
            if (params.backgroundColor != null) bColor = params.backgroundColor;
            if (params.Padding != null) iPadding = params.Padding;

            $t.mousemove(function(e) {
                $(".ThisISImageFollowMouseImage"+ MyClassUses +"")
                .css('top', e.clientY + X)
                .css('left', e.clientX + Y)
                .css('visibility', 'visible')
                .css('border', '2px solid #bbb')
                .css('padding', iPadding)
                .css('backgroudColor', '#fff')
                ;
            });

            $t.mouseout(function(e) {
                $(".ThisISImageFollowMouseImage"+ myclass +"")
                .css('visibility', 'hidden');
            });
        });

        return this;
    };
})(jQuery);*/
