{"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,QAAAA,iBAGAC,EAAA,sBAAAC,cAGAD,EAAA,oBAAAE,KAAA,WACA,GAAAC,GAAAH,EAAAI,MAAAC,QACAC,EAAAN,EAAAI,MAAAG,QACAP,GAAAI,MAAAI,KAAA,iBAAAL,GACAH,EAAAI,MAAAI,KAAA,kBAAAF,KAIAG,cAEAT,EAAAU,QAAAC,OAAA,WACAF,gBAIA,QAAAA,eACAT,EAAA,oBAAAE,KAAA,WACA,GAAAU,GAAAZ,EAAAI,MAAAS,QAAA,gBAAAR,QACAF,EAAAH,EAAAI,MAAAC,OACAF,IAAAS,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,SAlCAO,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}"]}