var meta_info = Array();
var data_loaded = false;

function is_array( mixed_var ) {
    var key = '';

    if (!mixed_var) {
        return false;
    }

    if (typeof mixed_var === 'object') {

        if (mixed_var.hasOwnProperty) {
            for (key in mixed_var) {
                // Checks whether the object has the specified property
                // if not, we figure it's not an object in the sense of a php-associative-array.
                if (false === mixed_var.hasOwnProperty(key)) {
                    return false;
                }
            }
        }

        // Uncomment to enable strict JavsScript-proof type checking
        // This will not support PHP associative arrays (JavaScript objects), however
        // Read discussion at: http://kevin.vanzonneveld.net/techblog/article/javascript_equivalent_for_phps_is_array/
        //
        //  if (mixed_var.propertyIsEnumerable('length') || typeof mixed_var.length !== 'number') {
        //      return false;
        //  }

        return true;
    }

    return false;
}

$(function() {
	// Bold all instances of "orbital design group"
	var doc_html = $('#body').html();
	doc_html = doc_html.replace(/(brooklyn \/ creative)/gi, function (w) { return "<strong>"+w.toLowerCase()+"</strong>"; });
	//doc_html = doc_html.replace(/\b(orbital)\b/gi, function (w) { return "<strong>"+w.toLowerCase()+"</strong>"; });
	$('#body').html(doc_html);

	// Unscramble email addresses
	$(".email").defuscate();

	// Fixed Background
	//fixedBackground('/media/images/bg.jpg');

	// Info for portfolio items
	$('li.item a').portfolio_info();

});