$(document).ready(function(){$(".tip").tipsy({gravity:$.fn.tipsy.autoNS,html:true,fade:true});$.getJSON("/ajax/preloadImages.php",function(n){$.each(n,function(p,q){var o=new Image();o.src="/images/buttons/"+q})});$(".trigger_gallery img").jcaption({copyStyle:true,animate:true,show:{height:"show"},hide:{height:"hide"}});var d=$(window).width();var j=$("#scrollingDiv");var g=j.html();if(d<1000){j.hide()}$(window).resize(function(){if($(window).width()<1024){j.html("")}else{j.html(g)}});$(window).scroll(function(){j.stop().animate({marginTop:($(window).scrollTop()+30)+"px"},"slow")});$("a#requestquote,a#requestquote_top").myModal({popupHeight:400,initialMessage:"Get In Touch",closeLink:"Close",closeMessage:"Goodbye!",sentMessage:"Thanks For Your Enquiry",opacity:0.7,ajaxFormUrl:"/ajax/form_feedback.php",ajaxValidationUrl:"/ajax/form_validation.php"});$("ul.sf-menu").superfish({delay:500,pathClass:"current",animation:{opacity:"show",height:"show"},speed:"normal",autoArrows:false,dropShadows:false});$("ul.sf-menu li").hover(function(){$(this).children("a").addClass("hover")},function(){$(this).children("a").removeClass("hover")});$("ul.subnav li a:last").addClass("roundedSubNav");$("#slider li").show();$("#slider").easySlider({auto:false,continuous:true,speed:500,prevText:"",nextText:""});$("#showcase_gallery img").css({display:"block"}).show();var h=$("#content-holder dl").size();var f=$("#content-holder dl").outerWidth(true);var l=h*f;$("#content-holder").css({width:l});$("#gallerySlider").slider({animate:true,change:i,slide:b});function i(p,o){var n=$("#content-scroll").prop("scrollWidth")-$("#content-scroll").width();$("#content-scroll").animate({scrollLeft:o.value*(n/100)},1000)}function b(p,o){$("#content-scroll dl").css({visibility:"visible"});var n=$("#content-scroll").prop("scrollWidth")-$("#content-scroll").width();$("#content-scroll").prop({scrollLeft:o.value*(n/100)})}$(".trigger").click(function(){$("#prevBtn,#nextBtn").hide();$(".tooltip").remove();$(".tooltipPortfolio").remove();$("#slide_pager,#slide_container").css({opacity:0});$("#slide_pager").css({"z-index":1});$("<div>").html($(this).next("div").html()).addClass("tooltip").appendTo($("#wrapper_inner")).show("drop",{direction:"up"}).effect("highlight");return false});$(".trigger_gallery").click(function(){$("#prevBtn,#nextBtn").hide();$(".tooltip").remove();$(".tooltipPortfolio").remove();$(".tooltipProjects").remove();$("#slide_pager,#slide_container").css({opacity:0});$("#slide_container h1").hide();$("#slide_pager").css({"z-index":1,opacity:1});$("<div>").html($(this).next("dd").html()).addClass("tooltipPortfolio").appendTo($("#wrapper_inner")).show("drop",{direction:"up"}).effect("highlight");return false});$("a.close").live("click",function(){$("#prevBtn,#nextBtn").show();$("#slide_container").css({opacity:1});$("#slide_container h1").show();$("#slide_pager").css({"z-index":10,opacity:1});$(".tooltip").fadeOut("slow",function(){$(this).remove()});$(".tooltipPortfolio").fadeOut("slow",function(){$(this).remove()});return false});$("dl.partnerListing dt").myDialog({target:"dd",opacity:0.7,dialogWidth:400,dialogHeight:500,openEffect:"scale",closeEffect:"fade"});$("#portfolio_gallery").cycle({fx:"fade",speed:1500,timeout:3000});$(".testimonialsbox").cycle({fx:"scrollLeft",speed:1500,timeout:5000,delay:-1000,pause:1,before:k,after:e});function k(){$(".summary").not(":first").fadeOut("slow")}function e(){}$("input.btn").live("mouseover",function(){$(this).addClass("hover")});$("input.btn").live("mouseout",function(){$(this).removeClass("hover")});$("input.btn").live("focus",function(){$(this).addClass("hover")});$(".feature_box").each(function(){$(this).hover(function(){$(".inset",this).animate({top:0},function(){$(".inset h2 a",this).addClass("roundedTop")})},function(){$(".inset",this).animate({top:170,backgroundColor:"#a1b0b3;"},function(){$(".inset h2 a",this).removeClass("roundedTop")})})});$(".portfolioListing").each(function(){$(this).hover(function(){$(".portfolio_inset",this).animate({top:5,backgroundColor:"#b7d633;"})
},function(){$(".portfolio_inset",this).animate({top:164,backgroundColor:"#747474"})})});var c=$("form.search input:not(:submit)");var a=c.val();c.focus(function(){if($(this).val()==a){c.val("")}});$("form:not(.search) input:not(:submit),textarea ").live("focus",function(){$(this).addClass("focus");$(this).prev("label").addClass("focus")});$("form:not(.search) input:not(:submit),textarea ").live("blur",function(){$(this).removeClass("focus");$(this).prev("label").removeClass("focus")});$("form:not(.search) input:not(:submit),textarea ").live("keyup",function(){$(this).removeClass("focus");$(this).prev("label").removeClass("focus")});$("fieldset").each(function(){var n=$("legend",this).remove().text();$("<h2></h2>").text(n).prependTo(this)});function m(o){var r=[],q;var n=o.slice(o.indexOf("?")+1).split("&");for(var p=0;p<n.length;p++){q=n[p].split("=");r.push(q[0]);r[q[0]]=q[1]}return r}$(".success").hide().slideDown("slow").delay(5000).fadeOut("slow",function(){location.href="contact"});$("#loading").ajaxStart(function(){$(this).show()}).ajaxStop(function(){$(this).hide()})});
