var twnews = new Array(); var buildString = ""; jQuery.preloadImg = function(){ for( var i = 0; i < arguments.length; i++ ) { jQuery("").attr("src", arguments[i]); } }; $(document).ready(function() { var feedbackTab = { speed:300, containerWidth:296, containerHeight:$('.feedback-panel').outerHeight(), tabWidth:$('.feedback-tab').outerWidth(), init:function(){ $('a.feedback-tab').click(function(event){ if ($('.feedback-panel').hasClass('open')) { $('.feedback-panel').animate({left:'-' + feedbackTab.containerWidth}, feedbackTab.speed).removeClass('open'); } else { $('.feedback-panel').animate({left:'0'}, feedbackTab.speed).addClass('open'); } event.preventDefault(); }); } }; feedbackTab.init(); $(".feedbackbutton").click(function() { if ("" == $("#form-wrap textarea#message").val()) return false; var subject = $.base64Encode($("#form-wrap input#subject").val()); var product = $.base64Encode($("#form-wrap input#product").val()); var names = $.base64Encode($("#form-wrap input#names").val()); var email = $.base64Encode($("#form-wrap input#email").val()); var message = $.base64Encode($("#form-wrap textarea#message").val()); var response_message = "Thank you for your comment, see ya!" var dataString = 'email=' + encodeURIComponent(email) + '&message=' + encodeURIComponent(message) + '&subject=' + encodeURIComponent(subject) + '&names=' + encodeURIComponent(names) + '&product=' + encodeURIComponent(product); $.ajax({ type: "POST", url: "/send-feedback/", data: dataString, success: function() { $('#form-wrap').html("
"); $('#response-message').html(response_message).hide().fadeIn(500).animate({opacity: 1.0}, 1000).fadeIn(0, function(){ $('.feedback-panel').animate({left:'-' + (feedbackTab.containerWidth + feedbackTab.tabWidth)}, (feedbackTab.speed)).removeClass('open'); }) } }); return false; }); $("#slides").slides({ preload: true, preloadImage: '/img/loading.gif', play: 7000, pause: 250, hoverPause: true }); $('#buttons a').hover(function(){ $("#" + $(this)[0].rel).fadeIn('fast'); }, function(){ $("#" + $(this)[0].rel).fadeOut('fast'); }); $('div#select_language').hover(function(){ $('div#languages').css({'height':'auto'}).stop().slideDown('fast') }, function() { $('div#languages').stop().slideUp('fast') }); $('#menu ul li').hover(function(){ $(this).css({'background':'#333'}); $(this).find("div").css({'top':'35px', 'height':'auto'}).stop().slideDown('fast'); }, function(){ if($(this).hasClass("current")) { $(this).css({'background':'#000'}); } else { $(this).css({'background':'transparent'}); } $(this).find("div").stop().slideUp('fast'); }); $('#products a').click(function(){ $('#products a').css({'color':'#2d89b9'}); $('#products div.sheet').css({'position':'absolute'}).fadeOut('fast'); $(this.hash).fadeIn('slow'); $(this).css({'color':'#333'}); return false; }); $('#products a[href=#top]').click(); $('#product-list a').click(function(){ $('.product-info').css({'display':'none'}); $('#product-list a').removeClass('current'); $(this).addClass('current'); $(this.hash).fadeIn('slow'); return false; }); $('.product-info').css({'display':'none'}); $('.product-info:first').css({'display':'inline'}); $('#top').click(); var osNameSupport = $('#os')[0]; osNameSupport.value = navigator.oscpu; $('#send').click(function(){ $('#sendform').css({'display':'none'}); var message = $('#product')[0].value; $.post('http://www.rylstim.com/support/send/', {'subject':$.base64Encode($('#subject')[0].value), 'product':$.base64Encode($('#product')[0].value), 'email':$.base64Encode($('#email')[0].value), 'os':$.base64Encode($('#os')[0].value), 'ver':$.base64Encode($('#ver')[0].value), 'names':$.base64Encode($('#names')[0].value), 'message':$.base64Encode($('#message')[0].value) }, function(data){ $('#sendresult').css({'display':'block'}); }); var sendresult = $('#sendresult')[0]; sendresult.innerHTML = "

Your message was successfully sent.

"; return false; }); $.preloadImg("/img/tooltip.png"); }); function formatTwitString(str) { str=' '+str; str = str.replace(/((ftp|https?):\/\/([-\w\.]+)+(:\d+)?(\/([\w/_\.]*(\?\S+)?)?)?)/gm,'$1'); str = str.replace(/([^\w])\@([\w\-]+)/gm,'$1@$2'); str = str.replace(/([^\w])\#([\w\-]+)/gm,'$1#$2'); return str; }