﻿// JScript File

function confirmNews(text, text2, txt) {
var c = document.getElementById(txt)
    if(!c._clicked) {
        alert(text2);
        return false;
    }
    
    return confirm(text.replace('{0}', c.value))
}

function setValue(field) {
    if ('' != field.defaultValue) {
        if (field.value == field.defaultValue) {
            field.value = '';
        }
        else if ('' == field.value) {
            field.value = field.defaultValue;
        }
    }
}
function mycarousel_initCallback(carousel)
{
	// Disable autoscrolling if the user clicks the prev or next button.
	carousel.buttonNext.bind('click', function() {
		carousel.startAuto(0);
	});

	carousel.buttonPrev.bind('click', function() {
		carousel.startAuto(0);
	});

	// Pause autoscrolling if the user moves with the cursor over the clip.
	carousel.clip.hover(function() {
		carousel.stopAuto();
	}, function() {
		carousel.startAuto();
	});
}

$(document).ready(function () { 
				
	/*
	$('#slevy-ban').each(function(){			
		var COOKIE_NAME = 'zelez';
		$go = $.cookie(COOKIE_NAME);
		if ($go == null) {
			$.cookie(COOKIE_NAME, 'iwashere', { path: '/', expires: 1 });
			tb_show('', 'bnr.html?keepThis=true&height=620&width=798', null);
		}
		else {
		};
	});
	*/
				
	jQuery('#mycarousel').jcarousel({
    	wrap: 'circular',
		scroll: 2,
		auto: 3,
		initCallback: mycarousel_initCallback
	});

});
 
