﻿/// <reference path="..\Scripts\jquery-1.4.1-vsdoc.js" />
(function ($) {
    $ = jQuery; // HACK: for VS Intellisence - Remove this line before production
    $.fn.defaultpage = function (options) {
        var defaults = {

        },
        settings = $.extend({}, defaults, options);



        var $this = $(this);

        if ($this.is('div')) {
            initDefault();

        }
        else {
            alert("Element should be a div");
        }


        function login() {
            //http://tms.jdlogistics.com/App_BW/authenticate/authenticate.aspx
            var username = $('#username').val();
            var password = $('#password').val();
//            window.location = 'http://tms.jdlogistics.com/App_BW/authenticate/authenticate.aspx?username=' + username + '&password=' + password;
            window.open('http://tms.jdlogistics.com/App_BW/authenticate/authenticate.aspx?username=' + username + '&password=' + password);
        }



        function initDefault() {


            $('#loginButton').click(function (e) {
                e.preventDefault();
                login();
            });

        }



    }



})(jQuery);
