﻿$(document).ready(function() {
    $(".solarium").mouseover(function() {
        $("#dropdown").slideDown("slow");
    });

    $("#dd").click(function() {
        $("#language").slideDown("fast");
    });
    
    $("#dd").mouseover(function() {
        $("#language").slideDown("fast");
    });

    $("#dd").mouseleave(function() {
        $("#language").slideUp("fast");
    });

    $("#dropdown").mouseleave(function() {
        $("#dropdown").slideUp("fast");
    });

    $(".close").mouseover(function() {
        $("#dropdown").slideUp("fast");
    });

    $('.numlist li:even').addClass('even');

    $(".formNew").click(function() {

        if ($(this).attr("value") == "Sök...") {
            $(this).attr("value", "");
        }
    });

    $(".formNew").blur(function() {
        if ($(this).attr("value") == "") {
            $(this).attr("value", "Sök...");
        }
    });

    $(".formNew2").click(function() {

        if ($(this).attr("value") == "Search...") {
            $(this).attr("value", "");
        }
    });

    $(".formNew2").blur(function() {
        if ($(this).attr("value") == "") {
            $(this).attr("value", "Search...");
        }
    });


});


function animate(id) {
    var controlId = "#" + id + ""
    //$(controlId).slideUp("fast");

    $(controlId).stop().animate({        
        opacity: 1.0
    }, 200, 'swing');
}

function animateOut(id) {
    var controlId = "#" + id + ""
    //$(controlId).slideUp("fast");

    $(controlId).stop().animate({
        opacity: 0.8
    }, 200);
}