jQuery.preloadImages=function()
{for(var i=0;i<arguments.length;i++){jQuery("<img>").attr("src",arguments[i])}};
$(document).ready(function()

{jQuery.easing.def="easeOutCubic";$("#illustration a").hover(function(){$(this).next("em").animate({opacity:"show",top:"-70"},800)},function(){$(this).next("em").animate({opacity:"hide",top:"-90"},1500)});

$("a.show1").click(function(){$(this).addClass("activetab");$("a.show4, a.show3, a.show2, a.show5, a.show6, a.show7").removeClass("activetab");$(".wide").animate({marginLeft:"0px"},900);$("#navindicator").fadeOut("slow");return false});

$("a.show2").click(function(){$(this).addClass("activetab");$("a.show1, a.show3, a.show4, a.show5, a.show6, a.show7").removeClass("activetab");$(".wide").animate({marginLeft:"-880px"},1100);$("#navindicator").fadeOut("slow");return false});

$("a.show3").click(function(){$(this).addClass("activetab");$("a.show1, a.show2, a.show4, a.show5, a.show6, a.show7").removeClass("activetab");$(".wide").animate({marginLeft:"-1760px"},1100);$("#navindicator").fadeOut("slow");return false});

$("a.show4").click(function(){$(this).addClass("activetab");$("a.show1, a.show2, a.show3, a.show5, a.show6, a.show7").removeClass("activetab");$(".wide").animate({marginLeft:"-2640px"},1100);$("#navindicator").fadeOut("slow");return false});

$("a.show5").click(function(){$(this).addClass("activetab");$("a.show1, a.show2, a.show3, a.show4, a.show6, a.show7").removeClass("activetab");$(".wide").animate({marginLeft:"-3520px"},1100);$("#navindicator").fadeOut("slow");return false});

$("a.show6").click(function(){$(this).addClass("activetab");$("a.show1, a.show2, a.show3, a.show4, a.show5, a.show7 ").removeClass("activetab");$(".wide").animate({marginLeft:"-4400px"},1100);$("#navindicator").fadeOut("slow");return false});

$("a.show7").click(function(){$(this).addClass("activetab");$("a.show1, a.show2, a.show3, a.show4, a.show5, a.show6").removeClass("activetab");$(".wide").animate({marginLeft:"-5280px"},1100);$("#navindicator").fadeOut("slow");return false});

$(function(){$('a[@rel*=ces]').lightBox();$('a[@rel*=suvorna]').lightBox();$('a[@rel*=etext]').lightBox()});


$("button").click(function(){$(".error").hide();
var hasError=false;var emailReg=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,7})?$/;
var emailVal=$("#email").val();if(emailVal==''){$("#email").after('<span class="error">(Enter the email address)</span>');hasError=true}else if(!emailReg.test(emailVal)){$("#email").after('<span class="error">(Please enter a valid email address)</span>');hasError=true}var nameVal=$("#name").val();if(nameVal==''){$("#name").after('<span class="error">(You forgot to enter the name)</span>');hasError=true}var messageVal=$("#message").val();if(messageVal==''){$("#message").after('<span class="error">(You forgot to enter the message)</span>');hasError=true}var subjectVal=$("#subject").val();if(messageVal==''){$("#subject").after('<span class="error">(You forgot to enter the Subject)</span>');hasError=true}
var subjectVal=$("#subject").val();
var weburlVal=$("#weburl").val();
var webdescVal=$("#webdesc").val();
var emailToVal="jwhanif@gmail.com";

if(hasError==false){$(this).hide();$("button").append('<img src="assets/images/loading.gif" alt="submiting" id="submitingform" />');$.post("http://localhost/jwhanif/ajaxsubmit.php",{emailTo:emailToVal,emailFrom:email,Name:nameVal,subject:subjectVal,Website:weburl,WebDesc:webdescVal,message:messageVal},

function(data){$("#submitingform").hide("normal",function(){$(".wide").animate({marginLeft:"-880px"},800)})})}return false});$(window).load(function(){$("#sidetabs").animate({opacity:"show",left:"1"},1000);$("#navindicator").animate({opacity:"show",left:"6"},1000)})});








