|
@@ -86,4 +86,17 @@ if (is_ie7down && 'attachEvent' in window){
|
|
|
oListItems[oListItem].onmouseout = onmouseout;
|
|
|
}
|
|
|
});
|
|
|
-}
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+// automatic responsive image resizing
|
|
|
+$(function(){
|
|
|
+ if($('.poster').length > 0){
|
|
|
+ var $sheet = $('<style>').appendTo('head');
|
|
|
+ $(window).resize(function(){
|
|
|
+ // 90% - 40px - 15em(of .poster)
|
|
|
+ var w = parseFloat($(window).width())*0.9-40-(15*Number(getComputedStyle($('.poster')[0], "").fontSize.match(/(\d*(\.\d*)?)px/)[1]));
|
|
|
+ $sheet.html('img.bbc_img{max-width:'+w+'px;}');
|
|
|
+ }).resize();
|
|
|
+ }
|
|
|
+});
|