Tag Creative

Number.prototype.map = function(istart, istop, ostart, ostop) {
	return ostart + (ostop - ostart) * ((this - istart) / (istop - istart));
};
 
var scroll_snap_t;
 
var browsers = ['msie','safari','chrome','mozilla'];
 
var snap_point_css = 'snapList(0, 768px, 1536px, 2304px, 3072px, 3840px, 4608px, 5376px, 6144px, @px, %px, $px)';
var info_can_be_clicked = true;
 
function checkScrollPosToElm(){
	var selected_item = $('html').attr('class').replace(/.+on_/,'');
	if(selected_item == 'people'){
		return false;
	}
	var element = $('#%'.replace('%', selected_item));
	var current_scroll_y = document.body.scrollTop;
	var elm_top_pos = $(element).offset().top;
 
	if(elm_top_pos != current_scroll_y){
		$.scrollTo(element, 200, {onAfter: function(e){
			clearTimeout(scroll_snap_t);			
		}});
	}
}
 
$(function(){
 
 
	$(window).resize(function(){
		setPolyWidth();
	});