/*
 * @author			Daniyal Hamid
 * 
 * @license			This JavaScript file is a commercial file, available for purchase at 
 *					http://codecanyon.net/user/daniyal/portfolio. Any illegal copying, 
 *					distribution, packaging or re-production of this script for commercial or 
 *					personal use is strictly prohibited and will be considered theft.
 *
 * @copyright		The author is the first owner of copyright and reserves all rights to
 *					all written work contained in this file. Distribution, re-production
 *					or commercial use of the written work in this file, without the author's 
 * 					signed permission, prior consent or a valid license, is strictly prohibited.
 *					The author is protected by the "Copyright, Designs and Patents Act 1988" of 
 *					the United Kingdom. Any infringement of the copyright, in or outside of the
 *					United Kingdom, may result in a lawsuit.
 */


(function(f){var b=new Array(),e="";var g={"8":"backspace","9":"tab","13":"enter","27":"esc","32":"space","33":"pg-up","34":"pg-dn","35":"end","36":"home","37":"left","38":"up","39":"right","40":"down","48":"0","49":"1","50":"2","51":"3","52":"4","53":"5","54":"6","55":"7","56":"8","57":"9","65":"a","66":"b","67":"c","68":"d","69":"e","70":"f","71":"g","72":"h","73":"i","74":"j","75":"k","76":"l","77":"m","78":"n","79":"o","80":"p","81":"q","82":"r","83":"s","84":"t","85":"u","86":"v","87":"w","88":"x","89":"y","90":"z","96":"num-0","97":"num-1","98":"num-2","99":"num-3","100":"num-4","101":"num-5","102":"num-6","103":"num-7","104":"num-8","105":"num-9","112":"f1","113":"f2","114":"f3","115":"f4","116":"f5","117":"f6","118":"f7","119":"f8","120":"f9","121":"f10","122":"f11","123":"f12","186":"semi-colon|;","187":"equal|=","188":"comma|,","189":"dash|-","190":"period|.","191":"/","219":"[","221":"]","220":"\\","16":"shift","17":"ctrl|control","18":"alt"};f(window).bind("focus",function(){e=""});if(!f.browser.msie){var d=window.alert,a=window.confirm,c=window.prompt;window.alert=function(){d.apply(window,arguments);e=""};window.confirm=function(){a.apply(window,arguments);e=""};window.prompt=function(){c.apply(window,arguments);e=""}}f(document).bind("keyup",function(j){if(null!=g[j.keyCode]){var h=g[j.keyCode].replace("|","\\|");var i=new RegExp("(?:\\\\\\+)?\\(\\?:"+h+"\\)","gi");if(i.test(e)){e=e.replace(i,"")}else{e=""}}else{e=""}});f(document).bind("keydown",function(h){if(h.keyCode===17&&e.indexOf("(?:ctrl|control)")===-1){e+=((""!=e)?"\\+":"")+"(?:ctrl|control)"}else{if(h.keyCode===16&&e.indexOf("(?:shift)")===-1){e+=((""!=e)?"\\+":"")+"(?:shift)"}else{if(h.keyCode===18&&e.indexOf("(?:alt)")===-1){e+=((""!=e)?"\\+":"")+"(?:alt)"}else{if(null!=g[h.keyCode]&&e.indexOf("(?:"+g[h.keyCode]+")")){e+=((""!=e)?"\\+":"")+"(?:"+g[h.keyCode]+")"}}}}if(e!=""){f.each(b,function(k,j){var l=new RegExp("^"+e+"$");if(l.test(j.key)){h.preventDefault();j.func.apply(j.selected,[h]);return false}})}});f.fn.assign=function(k,h,j){var i=f(this);if(null!=h&&typeof h==="object"){f.each(h,function(m,l){b.push({key:l,selected:i,func:j})})}f(i).bind(k,function(l){l.stopPropagation();j.apply(i,[l])})}})(jQuery);
