{"version":3,"sources":["blog-core.js"],"names":["setBlogScript","$","matchHeight","each","imgW","this","width","imgH","height","data","ScaleImages","window","resize","containerW","closest","css","Platform","Deferred","execute"],"mappings":"AAEA,SAAAA,gBAGAC,EAAA,sBAAAC,cAGAD,EAAA,oBAAAE,MAAA,WACA,IAAAC,EAAAH,EAAAI,MAAAC,QACAC,EAAAN,EAAAI,MAAAG,SACAP,EAAAI,MAAAI,KAAA,iBAAAL,GACAH,EAAAI,MAAAI,KAAA,kBAAAF,MAIAG,cAEAT,EAAAU,QAAAC,QAAA,WACAF,iBAIA,SAAAA,cACAT,EAAA,oBAAAE,MAAA,WACA,IAAAU,EAAAZ,EAAAI,MAAAS,QAAA,gBAAAR,QACAL,EAAAI,MAAAC,SACAO,GACAZ,EAAAI,MAAAU,IAAA,QAAAF,GACAZ,EAAAI,MAAAU,IAAA,SAAA,SAGA,IAAAd,EAAAI,MAAAI,KAAA,oBACAR,EAAAI,MAAAU,IAAA,QAAAd,EAAAI,MAAAI,KAAA,kBAAA,MACAR,EAAAI,MAAAU,IAAA,SAAAd,EAAAI,MAAAI,KAAA,mBAAA,UAlCAO,SAAAC,SAAAC,QAAAlB","file":"blog-core.min.js","sourcesContent":["Platform.Deferred.execute(setBlogScript);\r\n\r\nfunction setBlogScript()\r\n{\r\n // call matchheight for any blocks that have the class\r\n $('.blog-match-height').matchHeight();\r\n\r\n // store original sizes for images\r\n $('.postContent img').each(function () {\r\n var imgW = $(this).width();\r\n var imgH = $(this).height();\r\n $(this).data('original-width', imgW);\r\n $(this).data('original-height', imgH);\r\n });\r\n\r\n // images have a size set via the admin, need to handle resizing of browser to scale them down if larger than viewport\r\n ScaleImages()\r\n\r\n $(window).resize(function () {\r\n ScaleImages();\r\n }); \r\n}\r\n\r\nfunction ScaleImages() {\r\n $('.postContent img').each(function () {\r\n var containerW = $(this).closest('.postContent').width();\r\n var imgW = $(this).width();\r\n if (imgW >= containerW) {\r\n $(this).css('width', containerW);\r\n $(this).css('height', '100%');\r\n }\r\n else {\r\n if ($(this).data('original-width') != '') {\r\n $(this).css('width', $(this).data('original-width') + \"px\");\r\n $(this).css('height', $(this).data('original-height') + \"px\");\r\n }\r\n }\r\n });\r\n}"]}