/*
 * m.share.downloadInstructions.js
 * (c) 2008 Memeo, Inc.
 * Author: Grant Wiant (grant@memeo.com)
 * Comment: Extending to include the 'download' page specific logic
 */
m.share.downloadInstructions = (function() {
	// private methods

	return {
		// pubilic methods
		init: function() {
			$("#download").css({height:'1px', width:'1px', border:'none'});
			$(document).ready(function() {
				if (navigator.appVersion.indexOf("Win")!=-1) {
					$("#download").attr('src', 'http://www.memeo.info/download/autoshare/general/Memeo_Share.exe');
				} else if (navigator.appVersion.indexOf("Mac")!=-1) {
					$("#download").attr('src', 'http://www.memeo.info/download/memeoshare-mac/general/memeoshare_mac.dmg');
				}
				$("#downloadLink").click(function() {
					if (navigator.appVersion.indexOf("Win")!=-1) {
						location.href = 'http://www.memeo.info/download/autoshare/general/Memeo_Share.exe';
					} else if (navigator.appVersion.indexOf("Mac")!=-1) {
						location.href = 'http://www.memeo.info/download/memeoshare-mac/general/memeoshare_mac.dmg'
					}
					return false;
				});
			});
		}
	}
})();
m.share.downloadInstructions.init();