jQuery.fn.tipbox = function(content, allowHtml, className){
	jQuery.fn.tipbox.created.id = "tipBox";
	$("body").append(jQuery.fn.tipbox.created);
	//set some properties for the tipBox division
	var tipBox = $(jQuery.fn.tipbox.created);
	tipBox.css({"position":"absolute","display":"none"});

	//functions
	function tipBoxShow(e){
		tipBox.css({"display":"block", "top":e.pageY+16, "left":e.pageX});
	}
	function tipBoxHide(){
		tipBox.css({"display":"none"});
	}

	//events for each element
	this.each(function(){
		$(this).mousemove(function(e){
			tipBoxShow(e);
			//update the content
			if(allowHtml)
				tipBox.html(content);
			else
				tipBox.text(content);
			//remove all classes for the tipBox before add a new one and to avoid the "append class"
			tipBox.removeClass();
			//set class if specified
			if(className) tipBox.addClass(className);
		});
		$(this).mouseout(function(){
			tipBoxHide();
		});
	});
};

//create the element (avoiding create multiple divisions for the tipBox)
jQuery.fn.tipbox.created = document.createElement("div");

$().ready(function(){
	//SMA Plug
	$("div.smaStCrimpPlug").tipbox("<img src='http://www.wellshow.com/img/sma-st-crimp-plug.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaCrimpPlug").tipbox("<img src='http://www.wellshow.com/img/sma-ra-crimp-plug.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStSolderPlug").tipbox("<img src='http://www.wellshow.com/img/sma-st-solder-plug.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaSolderPlug").tipbox("<img src='http://www.wellshow.com/img/sma-ra-solder-plug.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaCapChainPlug").tipbox("<img src='http://www.wellshow.com/img/sma-cap-chain-plug.jpg' alt='SMA Connector' />", 1, "width");

	//SMA Jack
	$("div.smaStCrimpJack").tipbox("<img src='http://www.wellshow.com/img/sma-st-crimp-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStBhCrimpJack").tipbox("<img src='http://www.wellshow.com/img/sma-st-bh-crimp-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStBhOCrimpJack").tipbox("<img src='http://www.wellshow.com/img/sma-st-bh-o-crimp-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaCrimpJack").tipbox("<img src='http://www.wellshow.com/img/sma-ra-crimp-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStSolderJack").tipbox("<img src='http://www.wellshow.com/img/sma-st-solder-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaSolderJack").tipbox("<img src='http://www.wellshow.com/img/sma-ra-solder-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaBhCrimpJack").tipbox("<img src='http://www.wellshow.com/img/sma-ra-bh-crimp-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaBhSolderJack").tipbox("<img src='http://www.wellshow.com/img/sma-ra-bh-solder-jack.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStRece").tipbox("<img src='http://www.wellshow.com/img/sma-st-rece.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaSt2h").tipbox("<img src='http://www.wellshow.com/img/sma-st-2holes.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaSt4h").tipbox("<img src='http://www.wellshow.com/img/sma-st-4holes.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStPcb").tipbox("<img src='http://www.wellshow.com/img/sma-st-pcb.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaPcb").tipbox("<img src='http://www.wellshow.com/img/sma-ra-pcb.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaRaBhPcb").tipbox("<img src='http://www.wellshow.com/img/sma-ra-bh-pcb.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStEdge").tipbox("<img src='http://www.wellshow.com/img/sma-st-edge.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaStBhEdge").tipbox("<img src='http://www.wellshow.com/img/sma-st-bh-edge.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaSt2hExt").tipbox("<img src='http://www.wellshow.com/img/sma-st-2holes-ext.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaSt4hExt").tipbox("<img src='http://www.wellshow.com/img/sma-st-4holes-ext.jpg' alt='SMA Connector' />", 1, "width");
	$("div.smaSolderCup").tipbox("<img src='http://www.wellshow.com/img/sma-solder-cup.jpg' alt='SMA Connector' />", 1, "width");

	//RP SMA
	
	
	//SMB
	$("div.smbStCrimpPlug").tipbox("<img src='http://www.wellshow.com/img/smb-st-crimp-plug.jpg' alt='SMB Connector' />", 1, "width");
	$("div.smbRaCrimpPlug").tipbox("<img src='http://www.wellshow.com/img/smb-ra-crimp-plug.jpg' alt='SMB Connector' />", 1, "width");
	$("div.smbStBhCrimpJack").tipbox("<img src='http://www.wellshow.com/img/smb-st-bh-crimp-jack.jpg' alt='SMB Connector' />", 1, "width");
	$("div.smbStPcb").tipbox("<img src='http://www.wellshow.com/img/smb-st-pcb.jpg' alt='SMB Connector' />", 1, "width");
	$("div.smbRaPcb").tipbox("<img src='http://www.wellshow.com/img/smb-ra-pcb.jpg' alt='SMB Connector' />", 1, "width");
	//SSMB
	$("div.ssmbStPlug").tipbox("<img src='http://www.wellshow.com/img/ssmb-st-crimp-plug.jpg' alt='SSMB Connector' />", 1, "width");
	$("div.ssmbRaPlug").tipbox("<img src='http://www.wellshow.com/img/ssmb-ra-crimp-plug.jpg' alt='SSMB Connector' />", 1, "width");
	$("div.ssmbStJack").tipbox("<img src='http://www.wellshow.com/img/ssmb-st-crimp-jack.jpg' alt='SSMB Connector' />", 1, "width");
	//$("div.ssmbRaJack").tipbox("<img src='http://www.wellshow.com/img/ssmb-ra-crimp-jack.jpg' alt='SSMB Connector' />", 1, "width");
	$("div.ssmbStPcb").tipbox("<img src='http://www.wellshow.com/img/ssmb-st-pcb.jpg' alt='SSMB Connector' />", 1, "width");
	$("div.ssmbRaPcb").tipbox("<img src='http://www.wellshow.com/img/ssmb-ra-pcb.jpg' alt='SSMB Connector' />", 1, "width");

	//SMC
	$("div.smcStPlug").tipbox("<img src='http://www.wellshow.com/img/smc-st-crimp-plug.jpg' alt='SMC Connector' />", 1, "width");
	$("div.smcStJack").tipbox("<img src='http://www.wellshow.com/img/smc-st-crimp-jack.jpg' alt='SMC Connector' />", 1, "width");
	$("div.smcRaPcb").tipbox("<img src='http://www.wellshow.com/img/smc-ra-pcb.jpg' alt='SMC Connector' />", 1, "width");
	
	//MMCX
	$("div.mmcxStPlug").tipbox("<img src='http://www.wellshow.com/img/mmcx-st-crimp-plug.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxRaPlug").tipbox("<img src='http://www.wellshow.com/img/mmcx-ra.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxStJack").tipbox("<img src='http://www.wellshow.com/img/mmcx-st-crimp-jack.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxRaJack").tipbox("<img src='http://www.wellshow.com/img/mmcx-ra-crimp-jack.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxBhJack").tipbox("<img src='http://www.wellshow.com/img/mmcx-bu.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxStPcb").tipbox("<img src='http://www.wellshow.com/img/mmcx-pcb.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxRaPcb").tipbox("<img src='http://www.wellshow.com/img/mmcx-ra-pcb.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxSmt").tipbox("<img src='http://www.wellshow.com/img/mmcx-smt.jpg' alt='MMCX Connector' />", 1, "width");
	$("div.mmcxEdge").tipbox("<img src='http://www.wellshow.com/img/mmcx-edge.jpg' alt='MMCX Connector' />", 1, "width");
	//MCX
	$("div.mcxStPlug").tipbox("<img src='http://www.wellshow.com/img/mcx-st-crimp-plug.jpg' alt='MCX Connector' />", 1, "width");
	$("div.mcxRaPlug").tipbox("<img src='http://www.wellshow.com/img/mcx-ra-crimp-plug.jpg' alt='MCX Connector' />", 1, "width");
	$("div.mcxStJack").tipbox("<img src='http://www.wellshow.com/img/mcx-st-crimp-jack.jpg' alt='MCX Connector' />", 1, "width");
	$("div.mcxRaJack").tipbox("<img src='http://www.wellshow.com/img/mcx-ra-pcb-crimp-jack.jpg' alt='MCX Connector' />", 1, "width");
	$("div.mcxStPcb").tipbox("<img src='http://www.wellshow.com/img/mcx-st-pcb.jpg' alt='MCX Connector' />", 1, "width");
	$("div.mcxRaPcb").tipbox("<img src='http://www.wellshow.com/img/mcx-ra-pcb.jpg' alt='MCX Connector' />", 1, "width");

	//FME
	$("div.fmeStPlug").tipbox("<img src='http://www.wellshow.com/img/fme-st-crimp-plug.jpg' alt='FME Connector' />", 1, "width");
	$("div.fmeStJack").tipbox("<img src='http://www.wellshow.com/img/fme-st-crimp-jack.jpg' alt='FME Connector' />", 1, "width");

	//BNC
	$("div.bncStPlug").tipbox("<img src='http://www.wellshow.com/img/bnc-st-crimp-plug.jpg' alt='BNC Connector' />", 1, "width");
	$("div.bncRaPlug").tipbox("<img src='http://www.wellshow.com/img/bnc-ra-crimp-plug.jpg' alt='BNC Connector' />", 1, "width");
	$("div.bncStJack").tipbox("<img src='http://www.wellshow.com/img/bnc-st-crimp-jack.jpg' alt='BNC Connector' />", 1, "width");
	$("div.bncStBhJack").tipbox("<img src='http://www.wellshow.com/img/bnc-st-bh-crimp-jack.jpg' alt='BNC Connector' />", 1, "width");
	//$("div.bncStPcb").tipbox("<img src='http://www.wellshow.com/img/bnc-st-pcb.jpg' alt='BNC Connector' />", 1, "width");
	//$("div.bncRaPcb").tipbox("<img src='http://www.wellshow.com/img/bnc-ra-pcb.jpg' alt='BNC Connector' />", 1, "width");

	//TNC
	$("div.tncStPlug").tipbox("<img src='http://www.wellshow.com/img/tnc-st-crimp-plug.jpg' alt='TNC Connector' />", 1, "width");
	$("div.tncRaPlug").tipbox("<img src='http://www.wellshow.com/img/tnc-ra-crimp-plug.jpg' alt='TNC Connector' />", 1, "width");
	$("div.tncStJack").tipbox("<img src='http://www.wellshow.com/img/tnc-st-crimp-jack.jpg' alt='TNC Connector' />", 1, "width");
	$("div.tncStBhJack").tipbox("<img src='http://www.wellshow.com/img/tnc-st-bh-oring-crimp-jack.jpg' alt='TNC Connector' />", 1, "width");
	//$("div.tncStPcb").tipbox("<img src='http://www.wellshow.com/img/tnc-st-pcb.jpg' alt='TNC Connector' />", 1, "width");
	//$("div.tncRaPcb").tipbox("<img src='http://www.wellshow.com/img/tnc-ra-pcb.jpg' alt='TNC Connector' />", 1, "width");

	//N
	$("div.nStPlug").tipbox("<img src='http://www.wellshow.com/img/n-st-crimp-plug.jpg' alt='N Connector' />", 1, "width");
	$("div.nRaPlug").tipbox("<img src='http://www.wellshow.com/img/n-ra-crimp-plug.jpg' alt='N Connector' />", 1, "width");
	$("div.nStJack").tipbox("<img src='http://www.wellshow.com/img/n-st-crimp-jack.jpg' alt='N Connector' />", 1, "width");
	$("div.nStJack").tipbox("<img src='http://www.wellshow.com/img/n-st-crimp-jack.jpg' alt='N Connector' />", 1, "width");
	$("div.nSt4hole").tipbox("<img src='http://www.wellshow.com/img/n-4holes.jpg' alt='N Connector' />", 1, "width");
	$("div.nStClampJack").tipbox("<img src='http://www.wellshow.com/img/n-st-clamp-jack.jpg' alt='N Connector' />", 1, "width");

	//1.0/2.3
	$("div.1023StPlug").tipbox("<img src='http://www.wellshow.com/img/1023-st-crimp-plug.jpg' alt='1.0/2.3 Connector' />", 1, "width");
	$("div.1023StJack").tipbox("<img src='http://www.wellshow.com/img/1023-st-bh-crimp-jack.jpg' alt='1.0/2.3 Connector' />", 1, "width");
	$("div.1023StPcb").tipbox("<img src='http://www.wellshow.com/img/1023-st-bh-pcb.jpg' alt='1.0/2.3 Connector' />", 1, "width");
	$("div.1023RaPcb").tipbox("<img src='http://www.wellshow.com/img/1023-ra-bh-pcb.jpg' alt='1.0/2.3 Connector' />", 1, "width");
	
	//1.6/5.6
	$("div.1656StPlug").tipbox("<img src='http://www.wellshow.com/img/1656-st-crimp-plug.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	$("div.1656RaPlug").tipbox("<img src='http://www.wellshow.com/img/1656-ra-crimp-plug.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	$("div.1656StJack").tipbox("<img src='http://www.wellshow.com/img/1656-st-bh-crimp-jack.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	$("div.1656RaJack").tipbox("<img src='http://www.wellshow.com/img/1656-ra-bh-crimp-jack.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	$("div.1656StPcb").tipbox("<img src='http://www.wellshow.com/img/1656-st-bh-pcb.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	$("div.1656RaPcb").tipbox("<img src='http://www.wellshow.com/img/1656-ra-bh-pcb.jpg' alt='1.6/5.6 Connector' />", 1, "width");
	
	//SMP
	$("div.smpRaJack").tipbox("<img src='http://www.wellshow.com/img/smp-ra-crimp-jack.jpg' alt='SMP Connector' />", 1, "width");
});
