﻿/// <reference path="../javascript/jQueryIntellisense.js"/>
/// <reference path="/Standard/Core/Javascript/Relational.Standard.Core.js"/>

Type.registerNamespace('Relational.Standard.Core');
Type.registerNamespace('Website.Behavior');

$(function() {

    // TODO do this a few seconds after load
    //    setTimeout(function() { $('div.EditTools').fadeOut(5000); }, 5000);
    $('div.EditTools').fadeOut(5000);
//    setTimeout(function() { $('div.EditTools').fadeOut(5000); }, 5000);

        $('div._EditableZone').hover(
        function() {
            $('div.EditTools', this).stop(true, true);
            $('div.EditTools', this).show();
        },
        function() {
            $('div.EditTools', this).fadeOut(2500);
        }
    );

//    $('div.EditableZone').hover(
//        function() {
//            $('div.EditTools', this)
//                .stop(true, true)
//                .show();
//            // Find out-of-dom children
//            $('._OutOfDomPlaceholder', this).each(function() {
//                $("[placeholderId='" + this.id + "'] div.EditTools")
//                    .stop(true, true)
//                    .show();
//            });
//        },
//        function() {
//            $('div.EditTools', this)
//                .fadeOut(5000);
//            $('._OutOfDomPlaceholder', this).each(function() {
//                $("[placeholderId='" + this.id + "']  div.EditTools")
//                    .fadeOut(5000);
//            });
//        }
//    );

});
