// JavaScript Document var formId = true; function returnID( id ) { formId = id; $("#image_upload_form").toggle(); $("#image_id").val(id); $("#testimonial_form").toggle(); } function emptyField( id ) { var me = $("#" + id); if( me.html() == "Enter your message here..." ) { me.html(""); return true; } else { return true; } } function replaceField( id ) { var me = $("#" + id); if( me.html() == false ) { me.html("Enter your message here..."); return true; } else { return true; } } function popUpLarge( src , width , height ) { day = new Date(); id = day.getTime(); eval("page" + id + " = window.open('" + src + "', '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left = 590,top = 334');"); } function popUpLarger() { var src = $(".viewlarger div.id").html(); var height = 3000; var width = 3000; day = new Date(); id = day.getTime(); eval("page" + id + " = window.open('" + src + "', '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=" + width + ",height=" + height + ",left = 590,top = 334');"); } function fadeIn( me ) { $(me).animate({ "opacity": "1" },500); } function fadeOut( me ) { $(me).animate({ "opacity": "0.4" },500); } function changeCurrentImage( id , gallery , ext ) { var image_url = "http://www.vantuner.co.uk/images/gallery_images/" + gallery + "/" + id; var current_src = $(".front img").attr("src"); $(".back img").attr("src", current_src); $(".front").css("display","none"); $(".front img").attr("src", image_url + "-600" + ext ); $.ajax({ type: "GET", url: "http://www.vantuner.co.uk/gallery/return_margins.php", data: "image=" + image_url + "-600" + ext + "&target=600", success: function(success) { $(".front img").removeAttr("style"); $(".front img").attr("style",success); } }); $(".back img").fadeOut(); $(".front").fadeIn(500); $(".viewlarger div.id").html( image_url + '-full' + ext); } function adminGetSeries( manu ) { $("#ser").html(''); $.ajax({ url: "http://www.vantuner.co.uk/admin/database/get-series.html", type: "POST", data: "parent=" + manu, success: function( success ) { $("#ser").html( success ); $("#ser").removeAttr("disabled"); } }); } function adminGetModel() { var ser = $("#ser").val(); if( ser != "false" ) { $("#mod").html(''); $("#mod").attr("disabled","disabled"); $.ajax({ url: "http://www.vantuner.co.uk/power-tables/get-model.html", type: "POST", data: "parent=" + ser, success: function( success ) { $("#mod").html( success ); $("#mod").removeAttr("disabled"); } }); } } function getSeries() { var manu = $("#m").val(); if( manu != "false" ) { $("#s").html(''); $("#s").attr("disabled","disabled"); $("#mo").html(''); $("#mo").attr("disabled","disabled"); $.ajax({ url: "http://www.vantuner.co.uk/power-tables/get-series.html", type: "POST", data: "parent=" + manu, success: function( success ) { $("#s").html( success ); $("#s").removeAttr("disabled"); } }); } } function getModel() { var ser = $("#s").val(); if( ser != "false" ) { $("#mo").html(''); $("#mo").attr("disabled","disabled"); $.ajax({ url: "http://www.vantuner.co.uk/power-tables/get-model.html", type: "POST", data: "parent=" + ser, success: function( success ) { $("#mo").html( success ); $("#mo").removeAttr("disabled"); } }); } } function getVan() { var mo = $("#mo").val(); if( mo != "false" ) { $("#van").html('
Loading...
'); $.ajax({ url: "http://www.vantuner.co.uk/power-tables/get-van.html", type: "POST", data: "id=" + mo, success: function( success ) { $("#van").html( success ); } }); } } $(document).ready(function(){ $(".thumb_strip_wrapper img").animate({ "opacity": "0.4" },500); });