header ( 'Content-Type: text/javascript; charset=UTF-8'); include('koodi/header.php'); ?> $(document).ready(function() { var stop = 0; //if(jQuery.browser.msie) { //if(parseFloat(jQuery.browser.version) < 9) //stop = 0; //} if (stop == 0) { if (!empty($site) && file_exists($polku.'tyylit/'.$val_vuokraamo.'/'.$site.'.css')) $csstiedosto = $site.'.css'; else $csstiedosto = 'style.css'; echo ' url = \''.$polkuhtml.'css/style.css\'; url2 = \''.$polkuhtml.'tyylit/'.$val_vuokraamo.'/'.$csstiedosto.'\'; if (document.createStyleSheet) { document.createStyleSheet(url); document.createStyleSheet(url2); } else { $(\'\').appendTo(\'head\'); $(\'\').appendTo(\'head\'); } '; ?> lataa_kaavake(); } }); function lataa_kaavake() { var tujaus_id = $.cookie('tujaus_id'); var yhteenveto = ''; var varausid = $('.tu_jatkavahvistus').attr('alt'); var carclass = gup( 'carclass' ); var begin = gup( 'begin' ); var end = gup( 'end' ); var begintime = gup( 'begintime' ); var endtime = gup( 'endtime' ); var coupon = gup( 'coupon' ); var debug = gup( 'debug' ); //var coupon = gup( 'tu_kuponki' ); var km = gup( 'km' ); var type = gup( 'type' ); var language = gup( 'language' ); if (carclass != '') yhteenveto = yhteenveto+'&carclass='+carclass; if (begin != '') yhteenveto = yhteenveto+'&begin='+begin; if (begintime != '')yhteenveto = yhteenveto+'&begintime='+begintime; if (end != '') yhteenveto = yhteenveto+'&end='+end; if (endtime != '') yhteenveto = yhteenveto+'&endtime='+endtime; if (coupon != '') yhteenveto = yhteenveto+'&debug='+debug; if (coupon != '') yhteenveto = yhteenveto+'&coupon='+coupon; if (km != '') yhteenveto = yhteenveto+'&km='+km; if (type != '') yhteenveto = yhteenveto+'&type='+type; if (language != '') yhteenveto = yhteenveto+'&language='+language; if ($('#tu_yhteystiedot').length != 0) yhteenveto = yhteenveto+'&yhteenveto=1&varausid='+varausid; $('#tujausform').html('
'); $.getJSON(" echo $polkuhtml; ?>/vuokrauskaavake.php?id="+tujaus_id+"&renter= echo $val_vuokraamo; ?>&site= echo $site; ?>"+yhteenveto+"&jsoncallback=?", function(data){ var tujaus_id = $.cookie('tujaus_id', data.id, { expires: 1 }); $('#tujausform').html(data.html); //var transform = new $.Zebra_TransForm(); //transform.update(); }); } /*! * jQuery Cookie Plugin * https://github.com/carhartl/jquery-cookie * * Copyright 2011, Klaus Hartl * Dual licensed under the MIT or GPL Version 2 licenses. * http://www.opensource.org/licenses/mit-license.php * http://www.opensource.org/licenses/GPL-2.0 */ (function($) { $.cookie = function(key, value, options) { // key and at least value given, set cookie... if (arguments.length > 1 && (!/Object/.test(Object.prototype.toString.call(value)) || value === null || value === undefined)) { options = $.extend({}, options); if (value === null || value === undefined) { options.expires = -1; } if (typeof options.expires === 'number') { var days = options.expires, t = options.expires = new Date(); t.setDate(t.getDate() + days); } value = String(value); return (document.cookie = [ encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : '' ].join('')); } // key and possibly options given, get cookie... options = value || {}; var decode = options.raw ? function(s) { return s; } : decodeURIComponent; var pairs = document.cookie.split('; '); for (var i = 0, pair; pair = pairs[i] && pairs[i].split('='); i++) { if (decode(pair[0]) === key) return decode(pair[1] || ''); // IE saves cookies with empty string as "c; ", e.g. without "=" as opposed to EOMB, thus pair[1] may be undefined } return null; }; })(jQuery); function gup( name ) { name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+name+"=([^]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; } (function(e){e.Zebra_TransForm=function(n,p){var i=this;i.settings={};i.update=function(g){if(void 0==g||"function"!=typeof g.each)g=e('input[type="checkbox"], input[type="radio"], select');g.each(function(){var a=e(this),h=this,d=a.is("input:checkbox")?"checkbox":a.is("input:radio")?"radio":a.is("select")?"select":!1;if(d){var d=d.charAt(0).toUpperCase()+d.slice(1),b=a.data("Zebra_TransForm_"+d),j=a.attr("checked"),k=a.attr("disabled"),f=a.attr("multiple"),c=a.attr("size");if("Select"==d&&(f||c)){if("Select"== d&&(f||c))a.addClass(f||c?"Zebra_TransForm_List":"")}else{b&&b.remove();f=a.position();c={width:a.outerWidth(),height:a.outerHeight(),marginLeft:parseInt(a.css("marginLeft"),10)||0,marginTop:parseInt(a.css("marginTop"),10)||0};b=jQuery("