
function submitChk() {
    return confirm("Biztos benne?");
}

function addURL(target) {
    var url = prompt("Hivatkozás célja:", "http://");
    if(url == null) {
        url = '';
    }
    var urlText = prompt("Hivatkozás szövege:", url);
    if(url != null && url != 'http://' && url != '' && urlText != '' && urlText != null) {
        document.getElementById(target).value += " [link=" + url + "]" + urlText + "[/link] ";
    }
}

function emailCheck() {
    var emailRegExp = /^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/;
    if(document.mailform.name.value.length == 0 || document.mailform.message.value.length == 0 || emailRegExp.test(document.mailform.email.value) == false) {
        document.getElementById('errorDiv').innerHTML = 'K&eacute;rem ellen&#337;rizze a be&iacute;rt adatokat! <br /> <em>(minden mez&#337; kit&ouml;lt&eacute;se k&ouml;telez&#337;)</em>';
        return false;
    } else {
        return true;
    }
}
function showProduct(uID) {
    /*
     $(".imgcontainer").each(function() {
     if(this.id != 'product_' + uID) {
     $(this).animate({
     opacity : '0.7'
     }, 500);
     } else {
     $(this).animate({
     opacity : '1.0'
     }, 500);
     }
     });
     */
    $('.product').css('background-image', 'url(images/loading.gif)');
    $(".product").fadeOut(150, function() {
        $(".product").load("show.php?uID=" + uID, function() {
            $(".product").fadeIn(150, function() {
                $('.product').css('background-image', '');
                $('div.product-desc').hover(function() {
                    $('.product-desc').animate({ top : '280px' }, { queue : false, duration : 400 });
                }, function() {
                    $('.product-desc').animate({ top : '440px' }, { queue : false, duration : 400 });
                });
            });
        });
    });
}

(function ($) {
    $(window).load(function () {
        $("#li-banner").sp_Li_Slider({
            effect : false,
            auto_play: true,
            auto_hide: true,
            delay: 3000,
            trans_period: 2000,
            animation: 'Sqr-Random',
            vert_sections: 12,
            sqr_sections_Y: 6,
            buttons_show: false
        });
        
        $('.imgcontainer').first().children().first().trigger('click');
    });
})(jQuery);
