﻿$(function () {

    if (!$.browser.msie) {
        $('#main').hide();
        $('#main').fadeIn('fast', function () { });
    }

    $(".greenmsg").fadeOut(5000);

    /* Long text columnization */
    $("#suptermswrapper #columns").columnize();
    $("#clienttermswrapper #columns").columnize();
    $("#orderbody").columnize();

    /*Interest watermarks*/
    $("input#priceperword").watermark("price per source word");
    $("#generalinfo #Capacity").watermark("words / day");

    /*Datepicker*/
    $("#Leveransdatum").datepicker();
    $.datepicker.setDefaults(
        $.extend(
            { 'dateFormat': 'yy-mm-dd' }
        )
    );

    $(".datepicker").datepicker();
    $.datepicker.setDefaults(
        $.extend(
            { 'dateFormat': 'yy-mm-dd' }
        )
    );

    /*lang pair auto generate*/
    $("#AjaxLangPairs li > .removeLink").click(function (event) {
        event.preventDefault();
        $(this).parent().next().remove();
        $(this).parent().remove();
    });

    /*Career accordion*/
    $("#accordion").accordion({
        collapsible: true,
        active: false,
        autoHeight:false
    });

    /*Equal heights*/
    $(window).load(function () {
        $(".toppane").equalHeights();
//        $("#bottomstack fieldset").equalHeights()
    });

});
