/**
 * @author tomohiro tsutsumi
 */




var maybelline_top = function(){
	
	
	function setBrandSite(){
		
		var CONTAINER_DEF_H = 110;
		var IMG_DEF_H = 146;
		
		var _brandSiteSectionList = [];
		
		$('.brandSiteSectionInner').each(function(){
			_brandSiteSectionList.push($(this));
			_check($(this));
		});
		
		function _check(target){
			var dh = target.height() - CONTAINER_DEF_H;
			var tmpImgH = IMG_DEF_H + dh;
			
			target.find('div.thumbnail').height(tmpImgH);
		}
		
		function _onFontResize(){
			for(var i = 0, end = _brandSiteSectionList.length; i < end; i++){
				var tmpBrandSiteSection = _brandSiteSectionList[i];
				_check(tmpBrandSiteSection);
			}
		}
		
		function _init(){
			var trd = TextResizeDetector.addEventListener(_onFontResize, null);
			/*console.log('init at Top ===');
			console.log(trd);*/
		}
		
		TextResizeDetector.TARGET_ELEMENT_ID = 'brandSites';  
		TextResizeDetector.USER_INIT_FUNC = _init; 
	}
	
	
	return {
		setBrandSite : setBrandSite
	}
	
}();


$(function(){
	maybelline_top.setBrandSite();
});
