1 var mymedium = "<%= @medium %>";
5 var directory = "<%= @directory %>";
6 var isos = new Array();
7 <% @isos.each { |key, value| %>
8 <%= "isos['#{key}'] = '#{value}';" %>
11 function changeiso () {
13 var arch_suffix = "-64";
14 if ($('#i686').attr('checked')) {
17 myiso = directory + "/iso/openSUSE-" + isos[mylink + arch_suffix] + ".iso";
19 var download_suffix = '';
20 if ($('#p_torrent').attr('checked')) {
21 download_suffix = ".torrent";
23 if ($('#p_metalink').attr('checked')) {
24 download_suffix = ".metalink";
26 if ($('#p_mirror').attr('checked')) {
27 download_suffix = "?mirrorlist";
29 $('#sig_gpg').attr("href", myiso + ".asc");
30 $('#sig_md5').attr("href", myiso + ".md5");
31 $('#sig_sha1').attr("href", myiso + ".sha1");
32 mylink += download_suffix;
34 var langiso = directory + "/iso/openSUSE-" + isos['lang' + arch_suffix] + ".iso";
35 $('#md5_lang').attr('href', langiso + ".md5");
36 $('#sha1_lang').attr('href', langiso + ".sha1");
37 $('#gpg_lang').attr('href', langiso + ".asc");
38 $('#iso_lang').attr('href', langiso + download_suffix);
39 $('#iso_nonoss').attr('href', directory + "/iso/openSUSE-" + isos['nonoss'] + ".iso" + download_suffix);
41 $('#icon_' + mymedium).addClass('icon_selected').removeClass('icon_unselected');
43 $('#download_button').html( $('#download_' + mymedium).html());
46 function unselectOld() {
47 $('#icon_' + mymedium).removeClass('icon_selected').addClass('icon_unselected');
50 function resizeBoxes() {
51 var curmax = $('#ci_gnome').height();
52 curmax = Math.max(curmax, $('#ci_kde').height());
53 curmax = Math.max(curmax, $('#ci_net').height());
54 curmax = Math.max(curmax, $('#ci_dvd').height());
55 var curwidth = $('#ci_gnome').width();
56 $('#ci_gnome').height(curmax).width(curwidth);
57 $('#ci_kde').height(curmax).width(curwidth);
58 $('#ci_net').height(curmax).width(curwidth);
59 $('#ci_dvd').height(curmax).width(curwidth);
64 $('.helplink').show();
65 $('.script_only').show();
66 $('.noscript').hide();
68 $('.changeiso').click(function(){
72 $('div.changeiso').click(function(){
74 mymedium = this.id.substr(3);
78 $('button.changeiso').click(function(){
80 mymedium = this.id.substr(3);
84 $('#download_button').click(function() {
85 window.location = mylink;
88 $('#help_64').click(function() {
89 $("#arch_64").fadeIn("slow");
92 $('#help_32').click(function() {
93 $("#arch_32").fadeIn("slow");
96 $("#help_arch").hover(function(){
97 $("#arch_64").fadeIn(); // Other effects can be used to show the Tooltip
98 $("#arch_32").fadeIn(); // Other effects can be used to show the Tooltip
101 $("#arch_64").fadeOut();
102 $("#arch_32").fadeOut();
105 var resizeTimer = null;
107 $(window).bind('resize', function() {
108 if (resizeTimer) clearTimeout(resizeTimer);
109 resizeTimer = setTimeout(resizeBoxes, 100);