if ($.browser.msie) {
	window.console = {
		log: function() {}
	};
}

Array.prototype.remove = function(from, to) {
    var rest = this.slice((to || from) + 1 || this.length);
    this.length = from < 0 ? this.length + from : from;
    return this.push.apply(this, rest);
};

Array.prototype.randomize = function() {
    for (var i = 0; i < this.length; i++) {
        var j = Math.floor(Math.random() * this.length);
        var temp = this[i];
        this[i] = this[j];
        this[j] = temp;
    }
};

var imageCache = [];
function preloadImages() {
    for (var i = 0; i < arguments.length; i++) {
        var imgNode = document.createElement('img');
        imgNode.src = arguments[i];
        imageCache.push(imgNode);
    }
}

function setMinHeight() {
    var height = $(window).height();
    $('body,#bodywrap').css('min-height', height + 'px');
}

$(window).resize(setMinHeight);

$(function() {
	setMinHeight();

    $('.sidebar-section a').hover(function() {
        $('img.thumb', this).css('border', '2px solid red');
    }, function() {
        $('img.thumb', this).css('border', '2px solid #744d40');
    });

	$('#carousel .text .container').css('cursor', 'pointer').hover(function() {
		$('h2,h3', this).css('color', 'red');
	}, function() {
		$('h2,h3', this).css('color', 'white');
	}).click(function() {
		window.location = $('a', this).attr('href');
	});
});
