﻿var SiteMaster =
{
    Init: function() {
       // $('.date-pick').datePicker({ clickInput: true })

//        if (typeof pageLoad == "function") {
//            pageLoad();
//        }
//        $("ul.sf-menu").superfish();
//        $('.charcount').each(function() {
//            var minLimit = 100;
//            var maxLimit = parseInt($(this).attr('maxlength')) - 1;
//            var length = $(this).val().length;
//            //var length = $(this).val().split(/\b[\s,\.-:;]*/).length;   
//            // update characters
//            var counter = $(this).parent().find('.counter');
//            counter.html(length);
//            // bind on key up event   
//            $(this).keyup(function() {
//                // get new length of characters   
//                var new_length = $(this).val().length;
//                // get new length of words   
//                //var new_length = $(this).val().split(/\b[\s,\.-:;]*/).length;
//                // update
//                if (new_length >= minLimit) {
//                    counter.css("color", "#4e9614");
//                }
//                else {
//                    counter.css("color", "#b01919");
//                }
//                if ($(this).val().length > maxLimit) {
//                    $(this).val($(this).val().substr(0, maxLimit));
//                }
//                counter.html(new_length);
//            });
//        });
//        $('.user-profile').live('click', function() {
//            
//            var user_profile = $('#user-profile');
//            var username = $(this).text();
//            user_profile.html('');
//            $.post('/Account.mvc/ViewProfile', { Username: username },
//                    function(data) {
//            
//                        user_profile.html(data.message);
//                    }, "json");

//            $('#user-profile').jqm();
//            $('#user-profile').jqmShow();
//            return false;
//        });


    }
};

