/**
 * Clicky
 *
 * Make a link of selected subjects by the rel attribute.
 * Can set a class or execute given functions on hover.
 * Also sets the pointer as cursor (optionally).
 *
 * @param		attr		String			The attribute name to use as URL.
 * @param		over		String|Function	Class to add or function to run on hover
 * @param		out			Function		Function to run on mouseout (hover) if provided.
 * @param		hand		Boolean			Add curser:pointer css property on true
 * @param		external	Boolean			Open links in a new tab/window on true
 * @subpackage	jQuery
 * @author		Koos van Egmond | 7U Digital Handmade Originals
 */

(function($){$.fn.clicky=function(a){var b={attr:'rel',over:'hover',out:false,hand:true,external:false};a=$.extend(b,a);var c;return this.each(function(){var t=$(this);var o=a;var u=t.attr(o.attr);if(o.hand){t.css('cursor','pointer')}t.click(function(){if(o.external){window.open(u,'_blank')}else{window.location.href=u}});t.hover(function(){if(typeof o.over=='function'){o.over(t)}else{t.addClass(o.over)}c=window.status;window.status=u},function(){if(typeof o.over=='string'){t.removeClass(o.over)}if(typeof o.out=='function'){o.out(t)}window.status=c})})}})(jQuery);

