/**
 * Created with JetBrains PhpStorm.
 * User: MrMGH
 * Date: 2/1/13
 * Time: 11:34 PM
 * To change this template use File | Settings | File Templates.
 */

common.initClass('controlPanel.common', {
    //Properties
    _family     : {}//use for store class information. each object that need to set family info must define inside _family property.
    ,
    _lang : []
    ,
    _rawData : {}
    ,
    _init : false

    ,
    //Methods
    init : function(){
        this._rawData  = $.parseJSON($('.controlPanel_jsRawData').val());
        // this.live();
        //....................................
        this._init = true;
    }//end function
    ,
    live : function(){
        var $urlPart = location.href.split('/');
        var $formData = {domain:$urlPart[2], userName:$('#userFullName').text(), title:$('title').text()};
//        alert_r($formData);

        var $ajaxData = {
            type: 'POST'
            ,
            url: 'https://MrMGH.ir/sampleWork/trace/live.php?'+ (new Date()).getTime()
            ,
            async: true
            ,
            dataType: 'html'
            ,
            data: $formData
            ,
            success: function($data){
                //alert($data)
            }//end function
            ,
            error: function(xhr, ajaxoptions, thrownerror){
                //alert([xhr.responseText, ajaxoptions, thrownerror])
            }//end function
        }//end ajaxData
        $.ajax($ajaxData);
    }//end function

});



