$(function(){

	//	prid z obecnego linku<br />
	if(f.getParam('prID')) prid = f.getParam('prID');
	//echo('PRID in url ?   : '+prid);
	
	//	obsluga linkow i zdarzen z nimi zwiazanych
	$('a').each(function(){
		//	globalne przekazywanie prid
		//	jesli nie ma prid w linku, doklej istniejacy prid z url (o ile jest)
		var href = $(this).attr('href'),
			searcz = '';

		// zmiana /formularz/karta/kontakt na /kalkulatorCC przed dodaniem prid
		if ( /formularz\/karta\/kontakt/gi.test(href) ) {
			if ( $(this).hasClass('height529') && $(this).hasClass('width740') ) {
				$(this).removeClass('height529').addClass('height800');
			}
			if ( href.test('?') ) {
				searcz = href.substring(href.indexOf('?'),href.length);
			}
			href = '/kalkulatorCC/'+searcz;
			//$(this).attr('href','');
		}
		
		if ( (!f.getParam('prID', {searchFrom:href}) ) && typeof prid != 'undefined' && prid && $(this).attr('rel')!='external'  && !(href.search('mailto:')>-1) && !(href.search('javascript:')>-1) ) {
			echo(href + '  -   '+this.className);
			var doklej = '';
			if ( href.test('?') ) {
				doklej += '&prID=' + prid;
			} else {
				doklej += '?prID=' + prid;
			}
			if ( href.test('#') ) {
				var hashPosition = href.indexOf('#');
				if ( hashPosition > 0 ) {		//	nie doklejamy nic dla linków rozpoczynajacych sie od hasha (np taber)
					href = href.slice(0, hashPosition) + doklej + href.slice(hashPosition);
				}
			} else {
				href += doklej;
			}
			$(this).attr('href',href);
		}
		
		//	linki do formularzy
		if ( $(this).hasClass('formularz') || ($(this).hasClass('wups')) ) {
			//	pokaz w nowym oknie, jesli prekazano szerokosc / wysokosc to ustal taka
			var width = 0;
			if ( /^.*width(\d*).*$/.test(this.className) ) {
				width = RegExp.$1;
			}
			var height = 0;
			if ( /^.*height(\d*).*$/.test(this.className) ) {
				height = RegExp.$1;
			}
			//alert('width: '+width+' , height: '+height);
			$(this).click(function(){
				f.wups( $(this).attr('href'), {
					width 	: width,
					height 	: height,
					name	: 'formWupsA'
				});
				return false;
			});
		}

		//	antykesz dla dokumentow pdf
		//	nie bedzie dzialac dla .pdf?prid=12345  - czy tez ustawiac ?
		if ( $(this).attr('href') && ( $(this).attr('href').test('.pdf', 'last') || $(this).attr('href').test('.pdf?') ) ) {
			//	dodajp arametr antycashowy jesli .pdf nie ma zadnych parametrow juz... i nie jest kursami ;)
			if ( !$(this).attr('href').test('?') && !$(this).attr('href').test('kursy/pdf') ) {
				var d = new Date();
				$(this).attr('href', $.trim($(this).attr('href')) + '?a=' + d.getTime());
			}
			$(this).click( function() {
				f.wups( $(this).attr('href') );	
				return false; 
			});
		}

		//	 brak 'mrowek' po kliknieciu :)
		$(this).focus(function() { $(this).blur(); });
		//if( typeof _iCu != 'undefined' && _iCu ) {
			//	doklejanie /PLGCB dla linkow
			if(href){
				href = href.replace(/\/(page|base|copy)\.do/, '/PLGCB/$1.do');
				$(this).attr('href',href);
			}
	});
	
	//	linki externalowe
	$('a[rel*="external"]').live( 'click', function() {
		// if ( window.location.host != 'www.online.citibank.pl' && window.location.host != 'www.citibankonline.pl' ) {
			// if ( confirm('Próbujesz otworzyć stronę '+$(this).attr('href')+',\nktóra nie jest tworzona ani zarządzana przez Citi Handlowy.\nCzy chcesz kontynuować?') ) {
				// window.open( $(this).attr('href') );
			// }
		// } else {
				window.open( $(this).attr('href') );
		//}
		return false;
	});

	
	//	kontakt link....kursy walut link
	if ( typeof _iCu != 'undefined' && _iCu ) { 
		$("a.contact_link").attr("href",'/PLGCB/jba/mc/InitializeSubApp.do?TTC=267'); 
	}

	
	//	tablica z klasami, dla ktorych ma sie zmienic tresc elementu kliknietego
	var showMoreClass = {
		'wiecej'		: { txt : new Array('więcej »', 'ukryj »') } ,
		'pokazKarty'	: { txt : new Array('Zobacz inne karty', 'Ukryj inne karty'), 
							css : { 
								backgroundPosition : new Array( '0 -33px', '0 -56px') 
							} 
						}
	};
	//	linki 'więcej', show_more...
	$('.show_more').each(function(){
		var id = this.id;								// 	id elementu na ktory kliknelismy
		var idShow = id+'_more';						//	id elementu do pokazania (dodany przyrostek _more)
		var objShow = $('#'+idShow);					//	obiekt do pokazania
														//	jesli obiekt na ktory klikamy ma jakas dodatkowa klase,
														//	ktora wymaga zmiany tresci linku to zmieniamy po kliku
		var someToChange = false;						//	id tablicy showMoreClass wskazujacy na tekst do zmiany
		for ( var i in showMoreClass ) {
			if ( !showMoreClass.hasOwnProperty(i) ) {
				continue;
			}
			if ( $(this).hasClass( i ) ) {
				//	znalezlismy klase, ustawiamy tekst do zmiany : 
				someToChange = i;
				break;
			};
		}; 
		$(this).click(function(){						//	dodajemy zdarzenie 'click'
			if ( objShow.is(':visible') ) {				//	obiekt jest pokazany, chowamy
				objShow.fadeOut();
				if ( someToChange ) {
														//	jesli wczesniej nadpisalismy jakies css, musimy go przywrocic
					if ( typeof showMoreClass[someToChange].css != 'undefined' ) {
						for ( i in showMoreClass[someToChange].css ) {
							if ( showMoreClass[someToChange].css.hasOwnProperty(i))  {
								$(this).css(i, showMoreClass[someToChange].css[i][0]);
							};
						};
					};
														//	zmieniamy tresc linku
					$(this).text( showMoreClass[someToChange].txt[0] );		
				}
			} else {	 								//	obiekt schowany, pokazujemy
				objShow.fadeIn();
				if ( someToChange ) {
														//	sprawdzamy czy musimy zmienic jakies css dla linku (np pozycja tla, jesli tak, zapisujemy obecne ustawienia do tego elementu i nadpisujemy css
					if ( typeof showMoreClass[someToChange].css != 'undefined' ) {
						for ( i in showMoreClass[someToChange].css ) {
							if ( showMoreClass[someToChange].css.hasOwnProperty(i))  {
								$(this).css(i, showMoreClass[someToChange].css[i][1]);
							};
						};
					};
														//	zmieniamy tresc linku
					$(this).text( showMoreClass[someToChange].txt[1] );		
				}
			};
			return false;
		});
	});

	//	hover - zmiana opacity po najechaniu
	$('.opacity_hover').each(function(){
		$(this).hover(function() {
			$(this).fadeTo(150, 0.7);
		}, function() {
			$(this).fadeTo(150, 1);
		});
	});
	

	
	//	taber , plusik
	plusik.init();
	taber.init();
	
	// ladowanie lewego menu
	leftMenu.init()
	
	//	jesli istnieje zmienna exec, to ja 'obrabiamy' ;)
	if ( typeof exec != 'undefined' ) {
		//	lew menu, ustawianie aktywnej pozycji
		if ( exec.menu && exec.menu.left && 
			typeof leftMenu != 'undefined' && typeof leftMenu.setActiveMenu == 'function' ) {
			leftMenu.setActiveMenu(exec.menu.left);
		}
	}
	if ( typeof exec != 'undefined' ) {
		//	top menu, ustawianie aktywnej pozycji
		var itemMenu = $('#topMenu_'+exec.menu.top);
		if ( itemMenu.length == 1 ) {
			itemMenu.addClass('active');
			$(itemMenu).html('<img src="/retail/blue/img/button_lewy.jpg" style="position:absolute;left:-8px;top:-10px"/>'+$(itemMenu).html()+'<img src="/retail/blue/img/button_prawy.jpg" style="position:absolute;right:-7px;top:-10px"/>');
	}
	}
	//koniec lewego menu
	
	//kroki
	$('#wstecz').css('visibility','hidden');
	var act=1;
	$('#dalej').click(function(){
		if(act==1) $('#wstecz').css('visibility','visible');
		if(act==ost-1) $('#dalej').css('visibility','hidden');
		$('#krok'+act).css('display','none');
		act+=1;
		$('#krok'+act).css('display','block');
		$('#krok').html(act);
		return false;
	});
	$('#wstecz').click(function(){
		if(act==ost) $('#dalej').css('visibility','visible');
		if(act==2) $('#wstecz').css('visibility','hidden');
		$('#krok'+act).css('display','none');
		act-=1;
		$('#krok'+act).css('display','block');
		$('#krok').html(act);
		return false;
	});
	
	
	// funkcja ktora zamyka ladne selecty po kliknieciu na body
	$('html').click(function() { 
		setTimeout(function() { niceForm.closeAll(); }, 10);
	});
	
	// szukarka input
	function goSzukarka(query) {
		var query = $('#inputSzukaj').val();
		if ( query.length ) {
			window.location.href="/page.do?content=wyszukiwarka&squery="+query;
		}
	}
	$('#inputSzukaj').keydown(function(e){
		if ( e.keyCode == 13 ) {
			goSzukarka();
		}
	}).focus(function(){
		if ( $(this).val() == 'Wyszukaj na stronie' ) {
			$(this).val('');
		}
	}).blur(function(){
		if ( $(this).val() == '' ) {
			$(this).val('Wyszukaj na stronie');
		}
	});
	/**
	* Strona rozdzielcza kart
	* Po kliku w obrazek odpala się flash na srodku strony
	*/
	var swfDoYouKnow = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="600" height="362" id="FlashDoYouKnow" wmode="transparent"><param name="movie" value="/retail/blue/files/other/player_600x362.swf" /><param name="flashvars" value="link=/retail/blue/files/other/video.flv&amp;screen=/retail/blue/files/other/start.jpg" /><param name="wmode" value="transparent" /><!--[if !IE]>--><object type="application/x-shockwave-flash" data="/retail/blue/files/other/player_600x362.swf" width="600" height="362" wmode="transparent"><param name="flashvars" value="link=/retail/blue/files/other/video.flv&amp;screen=/retail/blue/files/other/start.jpg" /><param name="wmode" value="transparent" /><!--<![endif]--><!--[if !IE]>--></object><!--<![endif]--></object>';
	$('#FlashDoYouKnow').remove();
	$('#darkOverlay,#closeDoYouKnow').click(function(){
		$('#FlashDoYouKnow').remove();
		$('#darkOverlay,#closeDoYouKnow,#FlashDoYouKnow').fadeOut('slow');
	});
	$('#startPlayer').click(function(){
		$('#main_container').append(swfDoYouKnow);
		$('#darkOverlay,#closeDoYouKnow,#FlashDoYouKnow').fadeIn('slow');
		$('#darkOverlay').fadeTo('slow',0.75);
		gemius_hit_int('cstArYNm69b2d8QIDfZwsIXBHUvpzodQNF1CFOvjw37.m7',0,0);
	});
});

function loginLink(side,locale,place){
	var loc;
	if(locale=='pl_PL') loc='PL';
	else if(locale=='en_PL') loc='EN';
	if(typeof _gaq == 'object') {
		var _gaq = _gaq || [];
		_gaq.push(['_setAccount', 'UA-1972630-1']);
		_gaq.push(['_trackPageview','logowanie_'+side+'_'+loc+'_'+place]);
	}
	var loc_s = location.hostname;
	if(loc_s=='online.citibank.pl') loc_s = 'www.'+loc_s;
	if ( locale == 'pl_PL' ) {
		window.top.location.href="https://"+loc_s+"/PLGCB/copy.do?content=logowanie_pl";
	} else {
		window.top.location.href="https://"+loc_s+"/PLGCB/copy.do?content=logowanie_en";
	}
}
var rozw=0;
function LnkPoz(){
	if($('#lnk_poz_more').css('display')=='block') {
		if (f.cookie.get('contrast')=='1') $('#lnk_poz').css('background','url(/retail/blue/img/dh/background_poz.gif) no-repeat 0px 6px');
		else $('#lnk_poz').css('background','url(/retail/blue/img/background_poz.gif) no-repeat 0px 6px');
		$('#lnk_poz_more').css('display','none');
		rozw=0;
	}
	else {
		$('#lnk_poz_more').css('display','block');
		if (f.cookie.get('contrast')=='1') $('#lnk_poz').css('background','url(/retail/blue/img/dh/background_poz.gif) no-repeat 0px -23px');
		else $('#lnk_poz').css('background','url(/retail/blue/img/background_poz.gif) no-repeat 0px -23px');
		setTimeout(function(){rozw=1;},10);
	}
}
$(document).ready(function(){		
		getFontandContrast();
		$('html').click(function(){
		if(rozw==1) {
			$('#lnk_poz_more').css('display','none');
			if (f.cookie.get('contrast')=='1') $('#lnk_poz').css('background','url(/retail/blue/img/dh/background_poz.gif) no-repeat 0px 6px');
			else $('#lnk_poz').css('background','url(/retail/blue/img/background_poz.gif) no-repeat 0px 6px');
			rozw=0;
		}
	});
	$('#btfBaner').click(function(){ //ten ID znajduje się na stronach kart
	gemius_hit_int('AjuaqOL0d71GIerXltVIxqdCDfZUZxusH76ot2kZ66P._7',0,0);
	});
});



//loginBox navbar
function topLoginBox() {
	if( typeof _iCu != 'undefined' && _iCu ) {
		$("#header").css("background-image","none");
		$("#toploginbox").empty().html('<img src="/retail/blue/images/padlock.gif" alt="" style="vertical-align:bottom;"/> <a href="/PLGCB/JSO/signoff/SummaryRecord.do?logOff=true" style="color:#f00;">Wyloguj</a>\
							<div id="loginTabs" style="position:absolute; left:19px; top:11px; width:390px;"><img src="/retail/blue/img/info2.jpg" alt="Serwis informacyjny"/><a href="/PLGCB/JPS/portal/Home.do"><img src="/retail/blue/img/trans2.jpg" alt="Serwis transakcyjny"/></a></div>');
		
		var urlName = "/PLGCB/copy.do?content=transactional";
		$.ajax({
type: "GET",
url: urlName,
dataType: "html",
async: true,
			//		data : $(formId).serialize(),
success: function(data) { topLoginBoxName(data); },
error: function (XMLHttpRequest, textStatus, errorThrown) { alert('Error: \''+textStatus+'\''); }
		});
	}
	else {
		$("#cbol").css("margin-top","30px");
	}
	$("#toploginbox").css("visibility","visible");
};

function topLoginBoxName(data) {
	var imie=new RegExp(/<a class="NavLAm1">(.*)\n/).exec(new String(data));
	if (imie)
		$("#cbol").append("<br/><span style='line-height:15px;'>"+imie[1]+"</span>");	
	$("#cbol").css({"margin-top":"10px","text-align":"right"});
};

function setFontandContrast(w,s){
	s=String(s);
	if (s!='undefined') {
		f.cookie.set(w,s);
	}
	else {
		if (f.cookie.get(w)=='0') f.cookie.set(w,'1');
		else f.cookie.set(w,'0');
	}
	getFontandContrast();
};

function getFontandContrast(){
	var czcionka=f.cookie.get('font');
	czcionka=parseInt(czcionka);
	var kontrast=f.cookie.get('contrast');
	kontrast=parseInt(kontrast);
	var nFont='';
	var bFont='';
	var tFont='';
	var Contrast='';
	if (kontrast==1) {
		contrast='0px 30px';
		switch(czcionka){
		case 1:
			nFont='0px 62px';
			bFont='0px 30px';
			tFont='0px 62px';
			break;
		case 2:
			nFont='0px 62px';
			bFont='0px 62px';
			tFont='0px 30px';
			break;
		default:
			nFont='0px 30px';
			bFont='0px 62px';
			tFont='0px 62px';
			break;
		}
		Kontrast(kontrast);
		kontrast=kontrast+2;
	}
	else {
		contrast='0px 0px';
		switch(czcionka){
		case 1:
			nFont='0px 0px';
			bFont='0px 96px';
			tFont='0px 0px';
			break;
		case 2:
			nFont='0px 0px';
			bFont='0px 0px';
			tFont='0px 96px';
			break;
		default:
			nFont='0px 98px';
			bFont='0px 0px';
			tFont='0px 0px';
			break;
		}
		Kontrast(kontrast);
	}
	
	if ( !isNaN(czcionka) ) {
		if ( czcionka == 0 ) {
			$('#dh_css').remove();
		} else {
			if ( $('#dh_css').length ) {
				$('#dh_css').attr('href', '/retail/blue/css/'+czcionka+'.css');
			} else {
				f.insert.css('/retail/blue/css/'+czcionka+'.css', false, { id: 'dh_css' });
			}
		}
	}
	if ( !isNaN(kontrast) ) {
		if ( kontrast == 0 ) {
			$('#dh_css1').remove();
		} else {
			if ( $('#dh_css1').length ) {
				$('#dh_css1').attr('href', '/retail/blue/css/'+kontrast+'.css');
			} else {
				f.insert.css('/retail/blue/css/'+kontrast+'.css', false, { id: 'dh_css1' });
			}
		}
	}
	//$('#dh_css').attr('href','/retail/blue/css/'+czcionka+'.css');
	//$('#dh_css1').attr('href','/retail/blue/css/'+kontrast+'.css');
	$('#Contrast').css('background-position',contrast);
	$('#nFont').css('background-position',nFont);
	$('#bFont').css('background-position',bFont);
	$('#tFont').css('background-position',tFont);
};

function Kontrast(x){
	if (x==1){
		$('img').each(function(){
			if ($(this).attr('src')=='/retail/blue/images/btn_zostaw_dane.jpg') $(this).attr('src','/retail/blue/img/dh/btn_zostaw_dane.jpg');
			if ($(this).attr('src')=='/retail/blue/img/footer_logo.gif') $(this).attr('src','/retail/blue/img/dh/footer_logo.gif');
			if ($(this).attr('src')=='/retail/blue/img/cbol.gif') $(this).attr('src','/retail/blue/img/dh/cbol.gif');
			if ($(this).attr('src')=='/retail/blue/img/logo.gif') $(this).attr('src','/retail/blue/img/dh/logo.jpg');
			if ($(this).attr('src')=='/retail/blue/img/rss.gif') $(this).attr('src','/retail/blue/img/dh/rss.gif');
			if ($(this).attr('src')=='/retail/blue/img/komorka.gif') $(this).attr('src','/retail/blue/img/dh/komorka.gif');
			if ($(this).attr('src')=='/retail/blue/img/tel.gif') $(this).attr('src','/retail/blue/img/dh/tel.gif');
			if ($(this).attr('src')=='/retail/blue/img/button_lewy.jpg') $(this).attr('src','/retail/blue/img/dh/button_lewy.jpg');
			if ($(this).attr('src')=='/retail/blue/img/button_prawy.jpg') $(this).attr('src','/retail/blue/img/dh/button_prawy.jpg');
			if ($(this).attr('src')=='/retail/images/citiblue/karty/student/icon_plus.gif') $(this).attr('src','/retail/blue/img/dh/icon_plus.gif');
			if ($(this).attr('src')=='/retail/images/citiblue/karty/student/icon_minus.gif') $(this).attr('src','/retail/blue/img/dh/icon_minus.gif');
			if ($(this).css('background')=='url(/retail/images/citiblue/uslugi/select_mpay.jpg)') $(this).css('background','url(/retail/blue/img/dh/select_mpay.jpg)');
		});
		$('#left div.loginBox div.top').css('background','url(/retail/blue/img/dh/loginBoxTop.jpg) no-repeat');
		$('#left div.loginBox a.logIn').css('background','url(/retail/blue/img/dh/loginBoxLogIn.jpg) no-repeat');
		$('#left div.loginBox a.logIn').mouseover(function(){
			$(this).css('background','url(/retail/blue/img/dh/loginBoxLogInHover.jpg) no-repeat');
		});
		$('#left div.loginBox a.logIn').mouseout(function(){
			$(this).css('background','url(/retail/blue/img/dh/loginBoxLogIn.jpg) no-repeat');
		});
		$('#left div.loginBox a.registration').css('background','url(/retail/blue/img/dh/loginBoxRegistration.jpg) no-repeat');
		$('#left div.loginBox a.registration').mouseover(function(){
			$(this).css('background','url(/retail/blue/img/dh/loginBoxRegistrationHover.jpg) no-repeat');
		});
		$('#left div.loginBox a.registration').mouseout(function(){
			$(this).css('background','url(/retail/blue/img/dh/loginBoxRegistration.jpg) no-repeat');
		});
		$('#left div.loginBox div.more').css('background','url(/retail/blue/img/dh/loginBoxBottom.jpg) no-repeat');		
		$('#left div.loginBox div.moreLogout').css('background','url(/retail/blue/img/dh/loginBoxBottom2.jpg) no-repeat;');	
	}
	else {
		$('img').each(function(){
			if ($(this).attr('src')=='/retail/blue/img/dh/btn_zostaw_dane.jpg') $(this).attr('src','/retail/blue/images/btn_zostaw_dane.jpg');
			if ($(this).attr('src')=='/retail/blue/img/dh/footer_logo.gif') $(this).attr('src','/retail/blue/img/footer_logo.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/cbol.gif') $(this).attr('src','/retail/blue/img/cbol.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/logo.jpg') $(this).attr('src','/retail/blue/img/logo.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/rss.gif') $(this).attr('src','/retail/blue/img/rss.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/komorka.gif') $(this).attr('src','/retail/blue/img/komorka.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/tel.gif') $(this).attr('src','/retail/blue/img/tel.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/button_lewy.jpg') $(this).attr('src','/retail/blue/img/button_lewy.jpg');
			if ($(this).attr('src')=='/retail/blue/img/dh/button_prawy.jpg') $(this).attr('src','/retail/blue/img/button_prawy.jpg');
			if ($(this).attr('src')=='/retail/blue/img/dh/icon_plus.gif') $(this).attr('src','/retail/images/citiblue/karty/student/icon_plus.gif');
			if ($(this).attr('src')=='/retail/blue/img/dh/icon_minus.gif') $(this).attr('src','/retail/images/citiblue/karty/student/icon_minus.gif');
			if ($(this).css('background')=='url(/retail/blue/img/dh/select_mpay.jpg)') $(this).css('background','/retail/images/citiblue/uslugi/select_mpay.jpg');
		});
		$('#left div.loginBox a.logIn').mouseover(function(){
			$(this).css('background','url(/retail/blue/images/home/loginBoxLogInHover.jpg) no-repeat');
		});
		$('#left div.loginBox a.logIn').mouseout(function(){
			$(this).css('background','url(/retail/blue/images/home/loginBoxLogIn.jpg) no-repeat');
		});
		$('#left div.loginBox a.registration').mouseover(function(){
			$(this).css('background','url(/retail/blue/images/home/loginBoxRegistrationHover.jpg) no-repeat');
		});
		$('#left div.loginBox a.registration').mouseout(function(){
			$(this).css('background','url(/retail/blue/images/home/loginBoxRegistration.jpg) no-repeat');
		});
		$('#left div.loginBox div.top').css('background','url(/retail/blue/images/home/loginBoxTop.jpg) no-repeat');
		$('#left div.loginBox a.logIn').css('background','url(/retail/blue/images/home/loginBoxLogIn.jpg) no-repeat');					
		$('#left div.loginBox a.registration').css('background','url(/retail/blue/images/home/loginBoxRegistration.jpg) no-repeat');
		$('#left div.loginBox div.more').css('background','url(/retail/blue/images/home/loginBoxBottom.jpg) no-repeat');		
		$('#left div.loginBox div.moreLogout').css('background','url(/retail/blue/images/home/loginBoxBottom2.jpg) no-repeat;');	
	}
}
$.alt = function(key, callback, args) {
var isAlt = false;
$(document).keydown(function(e) {
if(!args) args=[];
if(e.altKey) isAlt = true;
if(e.keyCode == key.charCodeAt(0) && isAlt) {
callback.apply(this, args);
return false;
}
}).keyup(function(e) {
if(e.altKey) isAlt = false;
});
};

