$(document).ready(function () {
    //PointerEventsPolyfill.initialize({});
    //FastClick.attach(document.body);

    $("#dialog-pantographe").dialog({
        autoOpen: false,
        title: '<span id="picto-pole" class="picto"></span>Pantographe',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });

    $("#dialog-catenaire").dialog({
        autoOpen: false,
        title: '<span id="picto-ss1" class="picto"></span>Caténaire',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });
    
    $("#dialog-production").dialog({
        autoOpen: false,
        title: '<span id="picto-ss2" class="picto"></span>Production',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });
    
    $("#dialog-ss1").dialog({
        autoOpen: false,
        title: '<span id="picto-at" class="picto"></span>Sous-station 400 000 V – 90 000 V',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });

    $("#dialog-ss2").dialog({
        autoOpen: false,
        title: '<span id="picto-at" class="picto"></span>Sous-station 90 000 V – 25 000 V',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });

    $("#dialog-pylone").dialog({
        autoOpen: false,
        title: '<span id="picto-at" class="picto"></span>Pylone',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });

    $("#dialog-at").dialog({
        autoOpen: false,
        title: '<span id="picto-at" class="picto"></span>Autotransformateur',
        width: 500,
        modal: true,
        create: function(event, ui) {
            var widget = $(this).dialog("widget");
            $(".ui-dialog-titlebar-close span", widget).remove();
            
        }
    });
    
    $("#content .selector").click(function () {
        $("#dialog-"+$(this).attr('id')).dialog("open");
    });

});