$(document).ready(function () {

	$(".transticket").fancybox({

		'width'				: 970,
		'height'			: 700,
		'type'				: 'iframe',
		'padding'			: '0',
		'autoScale'			: false,
		'centerOnScroll'	: true
	});


    $('.BannersStartsida img').hover(function () {
        $(this).stop(true, true).fadeTo('fast', 1, function () {

        });
    }, function () {
        $(this).stop(true, true).fadeTo('slow', 0.7);
    });

    $('.default-value').each(function () {
        var default_value = this.value;
        $(this).focus(function () {
            if (this.value == default_value) {
                this.value = '';
            }
        });
        $(this).blur(function () {
            if (this.value == '') {
                this.value = default_value;
            }
        });
    });


    var currentSubmenu = $('.selectedSubmenu').html();
    $('#submenu').html(currentSubmenu);

    $('.firstlevel').hover(
    function () {
        var currentId = $(this).attr('id');

        $('.firstlevel a').removeClass('selected');
        $('#' + currentId + 'link').addClass('selected');

        var currentSubmenu = $('#' + currentId + 'second').html();
        $('#submenu').html(currentSubmenu);
    },
    function () {
    }
    );

    function onHover() {
        var idToShow = $(this).attr("idToShow");
        $('#' + idToShow).fadeIn("slow");
    }

    function onHoverOut() {
        var idToShow = $(this).attr("idToShow");
        $('#' + idToShow).fadeOut("fast");
    }

    var config = {
        over: onHover,
        out: onHoverOut,
        interval: 200
    };

    $(".showMore").hoverIntent(config);



});
