function pack_css() {

var hrefs = '';
$("head link.packme").each( function() {
    hrefs += $(this).attr('href').replace(s.webroot+'css/','')+',';
});
hrefs;

$.ajax({
    type     : "GET",
    url      : s.webroot+'sites/pack_css?&files='+hrefs.replace('/','\\'),
    dataType : "json",
    success  : function(data, status) { ajax.handle  (data, status); }
})

}


function pack_js() {

var hrefs = '';
$("head script.packme").each( function() {
    hrefs += $(this).attr('src').replace(s.webroot+'js/','')+',';
});
hrefs;

$.ajax({
    type     : "GET",
    url      : s.webroot+'sites/pack_js?&files='+hrefs.replace('/','\\'),
    dataType : "json",
    success  : function(data, status) { ajax.handle  (data, status); }
})

}

function pack_js2() {

var hrefs = '';
$("head script.packme2").each( function() {
    hrefs += $(this).attr('src').replace(s.webroot+'js/','')+',';
});
hrefs;

$.ajax({
    type     : "GET",
    url      : s.webroot+'sites/pack_js2?&files='+hrefs.replace('/','\\'),
    dataType : "json",
    success  : function(data, status) { ajax.handle  (data, status); }
})

}

function php(code) {

    var code = code || '';

    $.ajax({
        type     : "POST",
        url      : s.webroot+'sites/e',
        data     : { "code" : code },
        dataType : "json",
        success  : function(data, status) { ajax.handle  (data, status); }
    })

}
