﻿$(function() {

    $('textarea.max140').attr("MaxLength", "140");


    $('#form1').attr("class", "doDisplay");

    $('textarea.max140').maxlength({
        'feedback': '.charsLeft' // note: looks within the current form
    });
});
$(document).ready(function() {

    $('#trends1').css('opacity', 0.5)
    $('#trends2').css('opacity', 0.5)
    $('#trends3').css('opacity', 0.5)
    $('#trends4').css('opacity', 0.5)

    $('#trends1Dialog').dialog({ autoOpen: false, height: 650, width: 550, 
     show: 'fade',
     hide: 'fadeout', overlay: { background: "#666666", opacity: 0.1 },
        modal: true,
        bgiframe: true
    });
    $('#trends1').click(function() {
        $('#trends1Dialog').dialog('open');
    });

    $('#trends2Dialog').dialog({ autoOpen: false, height: 550, width: 700,
    show: 'fade',
     hide: 'fadeout', overlay: { background: "#666666", opacity: 0.1 },
        modal: true,
        bgiframe: true
    });
    $('#trends2').click(function() {
        $('#trends2Dialog').dialog('open');
    });


    $('#trends3Dialog').dialog({ autoOpen: false, height: 465, width: 650,
     show: 'fade', 
    hide: 'fadeout', overlay: { background: "#666666", opacity: 0.1 },
        modal: true,
        bgiframe: true
    });
    $('#trends3').click(function() {
        $('#trends3Dialog').dialog('open');
    });


    $('#trends4Dialog').dialog({ autoOpen: false, height: 380, width: 1000,
    show: 'fade',
     hide: 'fadeout', overlay: { background: "#666666", opacity: 0.1 },
        modal: true,
        bgiframe: true
    });
    $('#trends4').click(function() {
        $('#trends4Dialog').dialog('open');
    });

    //$("#UpdateProgress1").attr("style", "display:inline; visibility:hidden; ");
    //    $("#UpdateProgress1").attr("class", "graySubTitle");
   // $("#ServicesAccordion").accordion({  });
//    $('#ServicesAccordion').accordion({
//        changestart: function(event, ui) {
//            ui.newContent.css('overflow', 'hidden');
//        },
//        change: function(event, ui) {
//            ui.newContent.css('overflow', 'auto');
//        },
//        active: false,  clearStyle: true
//    });
    

    //$("#tabs").tabs({ selected: 0 }).tabs('rotate', 2000, 'false');
    $("#tabs").tabs({ selected: 0 });
    $("#tabs").tabs('option', 'fx', { opacity: 'toggle' });


    $('#presentationDialog').dialog({ autoOpen: false, height: 600, width: 800,
    show: 'fade',
    
     hide: 'fadeout', overlay: { background: "#666666", opacity: 0.1 },
        modal: true,
        bgiframe: true
    });

    // setDialogPosition();
    $('#presentationImage').click(function() {
        $('#presentationDialog').dialog('open');
    });



   




});


function setDialogPosition() {


    //var position2 = $('#chatImage').position();
    // $('#presentationDialog').dialog('option', 'position', [position2.left, position2.top - 303]);
    // $('#presentationDialog').dialog('option', 'position', [$('#chatImage').offset().left, $('#chatImage').offset().top - 303]);
    //$('#presentationDialog').dialog('option', 'width', 228);
    //$('#presentationDialog').dialog('option', 'resizable', false);


}
function hideStatus() {
    debugger
    if ($("#sendStatus").value == "")

    $("#sendStatus").attr("style", "display:none;");
    
}

function sendMail() {


}
