/* File: js/cashbox.js, Ratio: 25.3% */

var id;var dropdown;function faq(id){if($("#"+id+" .q_expand").attr('class')=='q_expand q_collide'){$(".q_hidden").hide('fast');$(".q_expand").removeClass("q_collide");}else{$(".q_hidden").hide('fast');$(".q_expand").removeClass("q_collide");$("#"+id+" .q_hidden").show('fast');$("#"+id+" .q_expand").addClass("q_collide");}}
$(document).ready(function(){$(".input_dropdown").click(function(){if($("#"+$(this).attr('id')+" .dropdown_items").is(':hidden')){$(".dropdown_items").hide('fast');$("#"+$(this).attr('id')+" .dropdown_items").show('fast');}else{$("#"+$(this).attr('id')+" .dropdown_items").hide('fast');}});$(".input_dropdown_mini").click(function(){if($("#"+$(this).attr('id')+" .dropdown_mini_items").is(':hidden')){$(".dropdown_mini_items").hide('fast');$("#"+$(this).attr('id')+" .dropdown_mini_items").show('fast');}else{$("#"+$(this).attr('id')+" .dropdown_mini_items").hide('fast');}});$(".input_dropdown_day").click(function(){if($("#"+$(this).attr('id')+" .dropdown_day_items").is(':hidden')){$(".dropdown_day_items").hide('fast');$("#"+$(this).attr('id')+" .dropdown_day_items").show('fast');}else{$("#"+$(this).attr('id')+" .dropdown_day_items").hide('fast');}});$(".input_dropdown_months").click(function(){if($("#"+$(this).attr('id')+" .dropdown_months_items").is(':hidden')){$(".dropdown_months_items").hide('fast');$("#"+$(this).attr('id')+" .dropdown_months_items").show('fast');}else{$("#"+$(this).attr('id')+" .dropdown_months_items").hide('fast');}});$('.dropdown_content span[title=""], .dropdown_mini_content span[title=""]').live('click',customSelect);$('.dropdown_day_content span[title=""], .dropdown_months_content span[title=""]').live('click',customSelect);$('.dropdown_content span[title], .dropdown_mini_content span[title]').live('click',customSelect);$('.dropdown_day_content span[title], .dropdown_months_content span[title]').live('click',customSelect);$(".toggle_title").click(function(){$(".toggle_container div.toggle_content").hide('fast');$(".toggle_container").removeClass('toggle_container_visible');if(!$(this).parent().children('div.toggle_content').is(':visible')){$(this).parent().children('div.toggle_content').show('fast');$(this).parent().addClass('toggle_container_visible');}});$('.r_info').hover(function(){var ident='#'+$(this).attr('tip');$.cursorMessage($(ident).html(),{hideTimeout:0});$('#cursorMessageDiv').css('margin-top',(-1*$(ident).height()-10)+'px');},$.hideCursorMessage);$('a.select_term').live('click',function(evt)
{evt.preventDefault();return false;});$('form a.select_term').live('click',function(evt)
{evt.preventDefault();$('#AppsApplicationAmountFinanced').val($(this).attr('ref_amount'));$('#AppsApplicationTerms').val($(this).attr('ref_terms'));$(".apply_value").removeClass("index_row_selected");$(this).parent('td').addClass("index_row_selected");var amountIdent='#amount_'+$(this).attr('ref_amount').replace(/[\., ]/g,'_');$(".index_bgn_selected").removeClass("index_bgn_selected");$(amountIdent).addClass("index_bgn_selected");var termIdent='#months_'+$(this).attr('ref_terms');$(".index_titles_selected").removeClass("index_titles_selected");$(termIdent).addClass("index_titles_selected");$('input[name="N"]').removeAttr('disabled');return false;});$('a.select_term').live('mouseover',function(evt)
{$(this).parent('td').addClass("index_row_hover");var amountIdent='#amount_'+$(this).attr('ref_amount').replace(/[\., ]/g,'_');$(amountIdent).addClass("index_bgn_hover");var termIdent='#months_'+$(this).attr('ref_terms');$(termIdent).addClass("index_titles_hover");}).live('mouseout',function(evt)
{$(this).parent('td').removeClass("index_row_hover");var amountIdent='#amount_'+$(this).attr('ref_amount').replace(/[\., ]/g,'_');$(amountIdent).removeClass("index_bgn_hover");var termIdent='#months_'+$(this).attr('ref_terms');$(termIdent).removeClass("index_titles_hover");});$('span[faq], div[faq]').click(function(evt){var id=$(this).attr('faq');faq(id);});if($(window.location.hash).length&&$('[faq='+window.location.hash.substr(1)+']').length)
faq(window.location.hash.substr(1));});customSelect=function(evt)
{var ident_code=$(this).attr('id');var ident=ident_code.substr(0,ident_code.indexOf('_'));$('span.current','#for_'+ident).html($(this).html());$('div.dropdown_items, div.dropdown_mini_items','#for_'+ident).hide('fast');$('#'+ident).val(ident_code.substr(ident_code.indexOf('_')+1)).change();};function dropdown(dropdown,id){$(document).ready(function(){$("#dropdown_"+dropdown+"_").val($("#"+id).attr('title'));$("#dropdown_"+dropdown+" .current").text($("#"+id).html());});}
onRegionChange=function(data,selectId)
{var reg=new RegExp("(option)","g");data=data.replace(reg,'span');reg=new RegExp("(value=\"([a-zA-Z0-9/.]+)\")","g");data=data.replace(reg,'id="'+selectId+'_$2" title="$2"');$('#from_'+selectId).html(data);$('span.current','#for_'+selectId).html('&nbsp;');};
