
 var shipconf = []; var payconf = []; 
 var virtuemart_currency_id = '47';  var opc_payment_refresh = false;  var opc_dynamic_lines = false;  var opc_default_option = 'com_virtuemart';  var opc_default_task = 'checkout'; 
		
		var ccErrors = new Array ();
		ccErrors [0] =  'Nepoznata vrsta kreditne kartice';
		ccErrors [1] =  'Niste unijeli broj kreditne kartice';
		ccErrors [2] =  'Broj kreditne kartice je nevažećeg formata';
		ccErrors [3] =  'Broj kreditne kartice nije valjan';
		ccErrors [4] =  'Kreditna kartica ima neprikladan broj znamenki';
		ccErrors [5] =  'Kreditna kartica je istekla';

		 var opc_debug = false;  var op_customer_shipping = false;  var opc_async = false;  var op_payment_inside = false;  var op_logged_in = '';  var op_last_payment_extra = null;  var op_logged_in_joomla = '1';  var op_shipping_div = null;  var op_lastq = "";  var op_lastcountry = null; var op_lastcountryst = null;  var op_isrunning = false;  var COM_ONEPAGE_CLICK_HERE_TO_REFRESH_SHIPPING = "Click here to refresh shipping rates";  var COM_VIRTUEMART_LIST_EMPTY_OPTION = "-- Odaberite --";  var COM_ONEPAGE_PLEASE_WAIT_LOADING = "Loading... Please wait";  var opc_theme = "icetheme_thestore";  var NO_PAYMENT_ERROR = "Odaberite način plaćanja";  var JERROR_AN_ERROR_HAS_OCCURRED = "Došlo je do greške.";  var COM_ONEPAGE_PLEASE_WAIT = "Please wait until the shipping rates are loaded and make sure a proper rate is selected.";  var COM_ONEPAGE_CHOOSE_DESIRED_DELIVERY_DATE_ERROR = "Plese choose your desired delivery date (required)";  var op_usernameisemail = false;  var op_loader = true;  var op_loader_img = "/media/system/images/mootree_loader.gif"; var op_onlydownloadable = "";  var op_last_field = false;  var op_refresh_html = "";  var no_alerts = false;  var username_error = 'Dati Korisničko ime već postoji.'; var email_error = 'The given E-mail already exists. '; var opc_no_duplicit_username = false;  var opc_no_duplicit_email = false;  var last_username_check = true;  var last_email_check = true;  var op_delay = false;  var op_last1 = '';  var op_last2 = '';  var op_com_user = 'com_users';  var op_com_user_task = 'user.login';  var op_com_user_action = '/index.php?option=com_users&task=user.login&controller=user';  var op_com_user_action_logout = '/index.php?option=com_users&task=user.logout&controller=user';  var op_com_user_task_logout = 'user.logout';  var op_userfields_named = new Array();  op_userfields_named['Vrijemedostave'] = 'Vrijeme dostave';  op_userfields_named['email'] = 'E-mail';  op_userfields_named['delimiter_billto'] = 'Vaši podaci za plaćanje';  op_userfields_named['company'] = 'Ime Tvrtke';  op_userfields_named['title'] = 'Naslov';  op_userfields_named['first_name'] = 'Ime';  op_userfields_named['middle_name'] = 'Srednje Ime';  op_userfields_named['last_name'] = 'Prezime';  op_userfields_named['address_1'] = 'Adresa';  op_userfields_named['address_2'] = 'Dodatna adresa';  op_userfields_named['zip'] = 'Poštanski broj';  op_userfields_named['city'] = 'Grad';  op_userfields_named['virtuemart_country_id'] = 'Država';  op_userfields_named['phone_1'] = 'Telefon';  op_userfields_named['phone_2'] = 'Mobitel';  op_userfields_named['fax'] = 'Fax';  op_userfields_named['shipto_Datumdostave20160420'] = 'Datum dostave';  op_userfields_named['shipto_Vrijemedostave'] = 'Vrijeme dostave';  op_userfields_named['shipto_company'] = 'Ime Tvrtke';  op_userfields_named['shipto_first_name'] = 'Ime';  op_userfields_named['shipto_middle_name'] = 'Srednje Ime';  op_userfields_named['shipto_last_name'] = 'Prezime';  op_userfields_named['shipto_address_1'] = 'Adresa';  op_userfields_named['shipto_address_2'] = 'Dodatna adresa';  op_userfields_named['shipto_zip'] = 'Poštanski broj';  op_userfields_named['shipto_city'] = 'Grad';  op_userfields_named['shipto_virtuemart_country_id'] = 'Država';  op_userfields_named['shipto_phone_1'] = 'Telefon';  op_userfields_named['shipto_phone_2'] = 'Mobitel';  op_userfields_named['shipto_fax'] = 'Fax';   var op_userfields = new Array("Datumdostave20160420","Vrijemedostave","email","username","name","password","password2","agreed","company","title","first_name","middle_name","last_name","address_1","address_2","zip","city","virtuemart_country_id","phone_1","phone_2","fax","shipto_Datumdostave20160420","shipto_Vrijemedostave","shipto_company","shipto_first_name","shipto_middle_name","shipto_last_name","shipto_address_1","shipto_address_2","shipto_zip","shipto_city","shipto_virtuemart_country_id","shipto_phone_1","shipto_phone_2","shipto_fax");  var op_firstrun = true;  var business_fields = new Array();  var custom_rendering_fields = new Array();  var shipping_obligatory_fields = new Array(); var shippingOpenStatus = false; var shipping_always_open = false;  var op_autosubmit = false;  var op_saved_shipping = null; var op_saved_payment = null; var op_saved_shipping_vmid = ''; var op_vendor_style = '1|€|2|,||3|8|8|{number} {symbol}|{sign}{number} {symbol}';  var op_currency_id = '47';  op_override_basket = true;  op_basket_override = true;  var opc_action_url = '/index.php?option=com_virtuemart&view=opc&controller=opc&task=checkout&nosef=1&lang=croatian';  var acode = '0';  var op_lang = '';  var op_securl = '/index.php?option=com_onepage';  var pay_btn = new Array();  var pay_msg = new Array();  pay_msg['default'] = '';  pay_btn['default'] = 'Završi narudžbu';  var op_timeout = 0;  var op_maxtimeout = 4;  var op_semafor = false;  var op_sum_tax = false;  var op_min_pov_reached = false;  var opc_logic = "checkout";  var payment_discount_before = false;  var op_payment_disabling_disabled = true;  var op_show_prices_including_tax = '1';  var never_show_total =  false; 
 var op_no_jscheck =  true;  var op_no_taxes_show =  false; 
 var op_no_taxes =  false; 
 var op_lang_select = '(-- Odaberite --)';  var op_dont_show_taxes = '0'; 
 var op_coupon_amount = "0"; 
 var op_shipping_txt = "Cijena dostave"; 
 var op_shipping_tax_txt = "PDV u dostavi"; 
 var op_ordertotal = 0.0;  var op_textinclship = 'Ukupno';  var op_currency = '€';  var op_weight = 0.00;  var op_zone_qty = 0.00;  var op_grand_subtotal = 0.00;  var op_subtotal_txt = "Iznos";  var op_tax_txt = "PDV ukupno"; var op_noshipping = false; var op_autosubmit = false; 
 var shipChangeCountry = "Please choose the right carrier for selected country"; 
 var opc_free_text = "(free)"; 
 var use_free_text = false; 
 var noshiptocmsg = "We are sorry, but we do not ship to the chosen country. Please select a different country or contact us by phone."; 
 var default_ship = null; 
 var agreedmsg = "Molimo vas da prihvatite Uvjete korištenja"; 
 var op_continue_link = ""; 
 var payment_default_msg = "The order should be followed by a payment"; 
 var payment_button_def = "Završi narudžbu"; 
 var op_dontloadajax = false;  var op_user_name_checked = false;  var op_email_checked = false;  var op_vendor_name = "OBRT VALIS FLORA"; 
 var op_order_total = 0; 
 var op_total_total = 0; 
 var op_ship_total = 0; 
 var op_tax_total = 0; 
var op_fix_payment_vat = false;  var op_run_google = new Boolean(false);  var op_always_show_tax = false; 
 var op_always_show_all = false; 
 var op_add_tax = false;  var op_add_tax_to_shipping = false; 
 var op_add_tax_to_shipping_problem = false; 
 var op_no_decimals = false; 
 var op_curr_after = false; 
 var op_basket_subtotal_items_tax_only = 0.00;  var op_show_only_total = false; 
 var op_show_andrea_view = false; 
 var op_detected_tax_rate = "0";  var op_custom_tax_rate = "0.00"; 
 var op_coupon_discount_txt = "Kupon za popust"; 
 var op_other_discount_txt = "Other discount"; 
 var op_shipping_inside_basket = false;  var op_payment_inside_basket = false;  var op_disabled_payments = ""; 
var op_payment_discount = 0; 
 var op_ship_cost = 0; 
 var pdisc = []; 
var op_payment_fee_txt = "Naknada za odabrani način plaćanja"; 
var op_payment_discount_txt = "Popust"; 
 var op_paypal_id = "x";  var op_paypal_direct = false;  var op_general_error = 'Nedostaje upis u obavezna polja'; var op_email_error = 'Molimo unestite valjanu e-mail adresu'; var op_pwderror = 'Lozinke koje ste unijeli ne podudaraju se. Molimo unesite željnu lozinku u polje za lozinku i potvrdite vaš unos ponovnim unošenjem u polje za potvrdu lozinke.';

    if (typeof jQuery != 'undefined')
   jQuery(document).ready(function() {
     jQuery('#userForm').bind('submit',function(){
		 if (userForm.coupon_code != null)
		 if (userForm.coupon_code.value != null)
		 {
		 new_coupon = Onepage.op_escape(userForm.coupon_code.value); 
		 if (typeof Onepage != 'undefined')
		 if (typeof Onepage.op_runSS != 'undefined')
		 {
         Onepage.op_runSS(this, false, true, 'process_coupon&new_coupon='+new_coupon); 
		 return false; 
		 }
		 }
    });
    });

