$(document).ready(function(){var e=false;if(e){$('#nav li:has(ul):not(.active):not(.open)').find('ul:visible').hide();$('#nav li:has(ul) > a, #nav li:has(ul) > span').click(function(){$(this).siblings('ul').slideToggle('fast').parent().siblings('li:not(.open)').find(' > ul:visible').slideUp('fast');return false})}$('#container1').jshuffle();$('#container2').jshuffle();$('#search_form').sform();$('#gallery a:not(.gallery_ignore), #content a.lightbox').lightBox();$('form.validate_form').jform({convert_text:true});$('form.buy_form').jform({prepend_all_errors:true});$('#main a[rel="external"]').attr('title','Visit website (Opens in a new window)').click(function(){window.open('/?out='+this.href);return false});$('#dev_footer a[rel="external"]').click(function(){return!window.open(this.href)});$('#header a.logout').click(function(){if(confirm('Are you sure you want to log-out?')){this.href=this.href+'?true'}else{return false}});$('#empty_basket').submit(function(){return confirm('Are you sure you want to empty your ENTIRE basket?')});$('a.remove_saved').click(function(){return confirm('Are you sure you want to permanently remove this Saved Order?')});$('div.toggle_order').hide().before('<span>[View Details]</span>').prev('span').css('cursor','pointer').click(function(){if($(this).html()=='[View Details]'){$(this).html('[Hide Details]').next('div').slideDown()}else{$(this).html('[View Details]').next('div').slideUp()}});$('label.js_back').append('<input type="button" value="&#8249; Back" />').children(':input').addClass('back').click(function(){history.go(-1)});$('img#cap').after('<span>[Reload image characters]</span>').next('span').addClass('re_cap').click(function(){var a=$(this).prev('img');$(a).attr('src',$(a).attr('src').replace(/[\d]+$/g,'')+Math.round(Math.random()*100000))});$('.live_stock').jStock({eleHeight:'250px'});$('#print_page').append('<span>Print this page<img src="/res/sys/icon_print.gif" alt="" /></span>').children('span').css('cursor','pointer').attr('title','Print this page').click(function(){window.print()});window.onload=function(){$('div.fix_height:even').each(function(){var a=$(this);var b=$(this).next();if(b){var c=a.height();var d=b.height();if(c>d){b.height(c+'px')}else if(c<d){a.height(d+'px')}}})}});