


    $(function () {
        // basic version is: $('div.demo marquee').marquee() - but we're doing some sexy extras
        
        $('div.slider marquee').marquee('pointer').mouseover(function () {
            $(this).trigger('stop');
        }).mouseout(function () {
            $(this).trigger('start');
        }).mousemove(function (event) {
            if ($(this).data('drag') == true) {
                this.scrollLeft = $(this).data('scrollX') + ($(this).data('x') - event.clientX);
            }
        }).mousedown(function (event) {
            $(this).data('drag', true).data('x', event.clientX).data('scrollX', this.scrollLeft);
        }).mouseup(function () {
            $(this).data('drag', false);
        });
    });


$(document).ready(function() {
  $("#leftBar h5").removeAttr("style");
  $("#leftBar h5").attr("id","nbs");
  $("#kurzyvalut-webnoviny-sk h2").removeAttr("style");
  $("#kurzyvalut-webnoviny-sk h2").attr("id","nbs");
  $(".pointer div").css("padding","0");
});

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);


// toggle visiblity
function toggle (targetId) {
	if (document.getElementById) {
		target = document.getElementById(targetId);
			if (target.style.display == "none") {
				target.style.display = "";
			}
			else {
				target.style.dispaly = "none";
			}
	}
}



//jump menu select box
function MM_jumpMenu(targ,selObj,restore){ //v3.0
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
 	if (restore) selObj.selectedIndex=0;
}

/* javascript checkuje ci vstupne udaje formulara v poli input
	su cislice, integer alebo iba pismena */
/* code from qodo.co.uk */
// create as many regular expressions here as you need:
var digitsOnly = /[1234567890]/g;
var integerOnly = /[0-9\.]/g;
var alphaOnly = /[A-Z]/g;

function restrictCharacters(myfield, e, restrictionType) {
	if (!e) var e = window.event
	if (e.keyCode) code = e.keyCode;
	else if (e.which) code = e.which;
	var character = String.fromCharCode(code);

	// if they pressed esc... remove focus from field...
	if (code==27) { this.blur(); return false; }
	
	// ignore if they are press other keys
	// strange because code: 39 is the down key AND ' key...
	// and DEL also equals .
	if (!e.ctrlKey && code!=9 && code!=8 && code!=36 && code!=37 && code!=38 && (code!=39 || (code==39 && character=="'")) && code!=40) {
		if (character.match(restrictionType)) {
			return true;
		} else {
			return false;
		}
		
	}
}
/* priklad
<p><label for="input1">digitsOnly: </label> <input type="text" id="input1" onkeypress="return restrictCharacters(this, event, digitsOnly);" /></p>

<p><label for="input2">integerOnly</label> <input type="text" id="input2" onkeypress="return restrictCharacters(this, event, integerOnly);" /></p>

<p><label for="input3">alphaOnly</label> <input type="text" id="input3" onkeypress="return restrictCharacters(this, event, alphaOnly);" /></p>

*/


