$(document).ready(function () {
    $(".iframePopup").fancybox({
        maxWidth: 800,
        maxHeight: 600,
        fitToView: false,
        width: '70%',
        height: '70%',
        autoSize: false,
        closeClick: false,
        openEffect: 'none',
        closeEffect: 'none'
    });
    
    $('#content_block p > img').parent().css('margin', 0);

    $(".carouselHolder").jCarouselLite({
        auto: 2800,
        speed: 900,
        btnNext: ".carousel .next",
        btnPrev: ".carousel .prev",
        visible: 1,
        useTextNavigation: true
    });

    $(".carouselHolderSmall").jCarouselLite({
        auto: 2800,
        speed: 900,
        btnNext: ".carousel .next",
        btnPrev: ".carousel .prev",
        visible: 1,
        useTextNavigation: false
    });

    $("body *").each(function () {
        var node = $(this);
        if (node.children().length == 0) {
            var text = node.html();
            if (text.length > 0) {
                var newText = text.replace(/aros/i, '<u style="text-decoration:none;text-transform:uppercase;">AR</u><u style="text-decoration:none;text-transform:lowercase;">o</u><u style="text-decoration:none;text-transform:uppercase;">S</u>');
                if (text != newText)
                    node.html(newText);
            }
        }
    });


    $("input.search_text").focus(function () {
        if (this.value == this.defaultValue)
        { this.value = ""; }
    }).blur(function () {
        if (!this.value.length)
        { this.value = this.defaultValue; }
    });

    
});

