$(document).ready(function() { var stop = 0; //if(jQuery.browser.msie) { //if(parseFloat(jQuery.browser.version) < 9) //stop = 0; //} if (stop == 0) { \').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("/vuokrauskaavake.php?id="+tujaus_id+"&renter=&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("
",{"class":"Zebra_TransForm_"+d}).css("visibility","hidden");if("Select"!=d)b.append(jQuery("
",{"class":"Checkbox"==d?"Zebra_TransForm_Checkbox_Tick":"Zebra_TransForm_Radio_Dot"})).bind("click",function(){a.trigger("change")});else var g=jQuery("
",{"class":"Zebra_TransForm_Arrow"}).appendTo(b), l=jQuery("
",{"class":"Zebra_TransForm_Text"}).css({fontFamily:a.css("fontFamily"),fontSize:a.css("fontSize"),fontStyle:a.css("fontStyle"),fontWeight:a.css("fontWeight")}).text(h.options[h.selectedIndex].text).appendTo(b);b.insertAfter(a);var m=a.data("events");if(m)for(var o in m)for(var n in m[o])b[o](e.proxy(m[o][n].handler,a.get(0)));"Select"!=d?b.css({left:f.left+(c.width-b.width())/2+c.marginLeft,top:f.top+(c.height-b.height())/2+c.marginTop}).addClass((j&&!k?"Zebra_TransForm_"+d+"_Checked": "")+(k&&!j?"Zebra_TransForm_"+d+"_Disabled":"")+(k&&j?" Zebra_TransForm_"+d+"_Checked_Disabled":"")):(k&&b.addClass("Zebra_TransForm_Select_Disabled"),e.extend(c,{paddingTop:parseInt(a.css("paddingTop"),10)||0,paddingRight:parseInt(a.css("paddingRight"),10)||0,paddingBottom:parseInt(a.css("paddingBottom"),10)||0,paddingLeft:parseInt(a.css("paddingLeft"),10)||0}),"static"==a.css("position")&&a.css({position:"relative",top:"",right:"",bottom:"",left:""}),a.css("z-index",20),e.browser.msie&&"7"==e.browser.version.charAt(0)&& (a.css({marginTop:c.paddingTop,marginBottom:c.paddingBottom,marginLeft:c.paddingLeft,marginRight:c.paddingRight}),c.height+=c.paddingTop+c.paddingBottom),b.css({left:f.left+c.marginLeft,top:f.top+c.marginTop,width:c.width-b.outerWidth(),height:c.height-b.outerHeight()}),g.css({top:(b.innerHeight()-g.outerHeight())/2,right:e.browser.webkit&&!navigator.userAgent.match(/chrome/i)?0:c.paddingRight}),l.css({top:(b.innerHeight()-l.outerHeight())/2,left:c.paddingLeft}));a.bind({focus:function(){b.addClass("Zebra_TransForm_"+ d+"_Focus")},blur:function(){b.removeClass("Zebra_TransForm_"+d+"_Focus")},change:function(){if(!a.attr("disabled"))if(d=="Checkbox"){b.toggleClass("Zebra_TransForm_Checkbox_Checked");b.hasClass("Zebra_TransForm_Checkbox_Checked")?a.attr("checked","checked"):a.removeAttr("checked","checked")}else if(d=="Radio"){e("input:radio[name="+a.attr("name")+"]").each(function(){var a=e(this);a.removeAttr("checked");a.data("Zebra_TransForm_Radio").removeClass("Zebra_TransForm_Radio_Checked")});b.addClass("Zebra_TransForm_Radio_Checked"); a.attr("checked","checked")}else l.html(h.options[h.selectedIndex].text)},keyup:function(){d=="Select"&&l.text(h.options[h.selectedIndex].text)}}).css("opacity","0.0001").data("Zebra_TransForm_"+d,b);b.css("visibility","visible")}(j=e('label[for="'+a.attr("id")+'"]'))&&j.addClass(k&&i.settings.style_disabled_labels?"Zebra_TransForm_Label_Disabled":"")}})};i.settings=e.extend({},{style_disabled_labels:!0},p);i.update(n)}})(jQuery);