﻿/// <reference assembly="System.Web.Extensions" name="MicrosoftAjax.js" />
/// <reference path="jquery-1.5.1-vsdoc.js" />
$(document).ready(
    function () {

        $('.text-box.tags').odataTags({ dataUrl: '/en/OData/Tag/' });
        
        // Limit input on textarea based on malength attribute
        $('textarea[maxlength]').limitTextArea();

        // Have all the password elements on the page validate
        $("#NewPassword").passwordValidate();

        // Preload images
        $('.ReferenceImage').each(
        function (s, e)
        {
            var url = e.src.replace('.gif', '-over.gif');
            $.preLoadImages(url);
        });
        // Set hoover behavior
        $('.ReferenceImage').hover(
        function (s)
        {
            s.target.src = s.target.src.replace('.gif', '-over.gif');
        },
        function (s)
        {
            s.target.src = s.target.src.replace('-over.gif', '.gif');

        });


        $('.text-box.date').datePickerCalendar();
        
        
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-9651978']);
        _gaq.push(['_trackPageview']);

    });
