// Whatever snippets we need
if (typeof(log) === "undefined"){
	function log(s) {
		try { console.log(s); } catch (e) {}
	}
}

var screensize = $('body').width();


// Let's get device appropriate sizes. Be nice to cell phones.
$('img.respond').each(function(){
	var use;
	if (screensize > 900) {
		use = $(this).attr('data-img-full');
	} else if(screensize > 480) {
		use = $(this).attr('data-img-tablet');
	} else {
		use = $(this).attr('data-img-mobile');
	}
	// alert(use);
	$(this).attr('src',use);
});

// Also, mark bigger screens as tablets so we can use CSS gradients when the processing power is there.
if (screensize > 640){
	$('html').addClass('tablet');
}
