{"version":3,"sources":["custom.js"],"names":["$","document","ready","height","each","this","addClass","on","siblings","removeClass","main","push","Array","parent","children","current","closest","index","appendTo","detach","footerPosition","clone","bodyHeight","windowHeight","footer","window","css","position","bottom","width","footerTopPos","windowResizedHeight","jQuery"],"mappings":"cAAA,SAAUA,GACNA,EAAEC,UAAUC,MAAO,WADtBF,EAAA,sBAAYG,OAAAH,EAAA,+BAAAG,UAEHH,EAAA,cAAAI,KAAsBD,WAEtBH,EAAAK,MAAcD,SAAM,mBAAWE,SAAA,cAI/BN,EAAA,wBAA2BO,GAAA,QAAS,WAGjCP,EAAOQ,MAAAA,SAAWC,YAEfC,EAAIL,MAAGG,WAAXC,YAAA,YAEQ,IAACE,EAAL,IAAAC,MADJZ,EAAAK,MAAAQ,SAAAL,SAAA,cAAAM,SAAA,OAAAV,KAAA,WAIIW,EAAUJ,KAAIC,QAClB,IAAAG,EAAA,IAAAH,MAIII,EAAAA,MAAUhB,SAAQa,OAART,KAAiBI,SAASS,GAExCF,EAAAJ,KAAAN,QAGEU,IAAQC,EAAVhB,EAAsBkB,MAAAA,SAASF,SAA/B,cAGJhB,EAAAU,EAAA,IAAAS,SALInB,EAAEU,EAAK,IAAIS,SAMfC,EAAAA,EAAc,IAAAC,QAAAH,SAAAF,GA/BlBhB,EAAAe,EAAA,IAAAM,QAAAH,SAAAF,KAoCQM,MAGJ,IAAGC,EAAeD,WACdE,IAAMF,EAAKtB,EAAA,QAAAG,SACPoB,EAAYvB,EAAAyB,QADLtB,SAEPqB,EAFOxB,EAAA,UAGPuB,EAASD,GAHbE,EAAAE,IAAA,CAKHC,SAAA,WAHOC,OAAS,IAIjBC,MAAA,SACI7B,EAEI8B,QAAAA,GAAAA,SAAeC,WAFCT,EAAcE,EAAOrB,SAGzCH,EAAgCyB,QAAAtB,SACjBqB,EAAArB,SAEPqB,EAFOE,IAAA,CAGEC,SAAA,WAHbC,OAAA,IAKCC,MAAA,SAGGL,EAFOE,IAAA,CAGEC,SAAA,WAHbC,OAAA,IAKHC,MAAA,YA/Db,CAmEGG","file":"custom.js","sourcesContent":["(function($) {\r\n $(document).ready( function() {\r\n $('.gallery-wrapper a').height($('.gallery-wrapper .main-pair').height());\r\n\r\n $('.alt-pairs').each( function() {\r\n $(this).children('.img-pair:first').addClass('selected');\r\n });\r\n\r\n $('.alt-pairs .img-pair').on('click', function() {\r\n\r\n $(this).addClass('selected');\r\n $(this).siblings().removeClass('selected');\r\n\r\n var main = new Array();\r\n $(this).parent().siblings('.main-pair').children('img').each( function() {\r\n main.push(this);\r\n });\r\n\r\n var current = new Array();\r\n $(this).children('img').each( function(index) {\r\n current.push(this);\r\n });\r\n\r\n var closest = $(this).parent().siblings('.main-pair');\r\n\r\n $(main[0]).detach();\r\n $(main[1]).detach();\r\n $(current[0]).clone().appendTo(closest);\r\n $(current[1]).clone().appendTo(closest);\r\n });\r\n\r\n /* load footerPosition function */\r\n footerPosition();\r\n } );\r\n\r\n /* footer position */\r\n var footerPosition = function () {\r\n var bodyHeight = $('body').height(),\r\n windowHeight = $(window).height(),\r\n footer = $('footer');\r\n if(windowHeight > bodyHeight){\r\n footer.css({\r\n 'position': 'absolute',\r\n 'bottom':'0',\r\n 'width': '100%'\r\n })\r\n }\r\n $(window).on('resize',function () {\r\n var contentHeight = bodyHeight - (footer.height()),\r\n windowResizedHeight = $(window).height(),\r\n footerTopPos = windowResizedHeight - (footer.height());\r\n if(contentHeight > footerTopPos){\r\n footer.css({\r\n 'position': 'relative',\r\n 'bottom':'0',\r\n 'width': '100%'\r\n })\r\n }else{\r\n footer.css({\r\n 'position': 'absolute',\r\n 'bottom':'0',\r\n 'width': '100%'\r\n })\r\n }\r\n })\r\n\r\n }\r\n})(jQuery);"]}