var startingPanel,endingPanel,panelIndex=0,rotateTimer,currentCarousel=0;var Dir=1,newIndex,activeColor="#025167",defaultColor="#5EC4CD";var activePosition=[],defaultPosition=[],defaultBackground="#fff";var newHTML='Get started today. Submit a <a href="CISform.doc">Client Information Sheet</a> ';newHTML+="&amp; passport right now. Attach it to your ";var mmail='<a href="mailto:';mmail+="&#112;&#114;&#111;&#110;&#116;&#111;&#99;&#111;&#109;&#109;&#101;&#114;&#99;&#105;&#97;&#108;";mmail+='@&#103;&#109;&#97;&#105;&#108;&#46;&#99;&#111;&#109;">email</a>.';var timerId1=0,timerId2=0,cookieLabel;var EaseType=["easeOutQuart","easeOutCubic","easeInOutCubic","easeOutSine","easeOutQuad","easeInOutQuad","easeOutBack","easeInBack","easeOutElastic","easeInOutBack","easeOutBounce","easeInBounce"];var h3Width=26,viewTime=3500,fullPanelWidth=527,aniSpeed=8000,easingMethod=EaseType[11];$("#IncreaseSize").hover(function(){$(this).css("color",defaultColor)},function(){$(this).css("color",activeColor)});$("#DecreaseSize").hover(function(){$(this).css("color",defaultColor)},function(){$(this).css("color",activeColor)});function activateH1(a){var b;b=$("h3").eq(a).attr("title");$(".feature > h1").text(b);$("h3").each(function(){$(this).css("backgroundColor",defaultColor)});$("h3").eq(a).css("backgroundColor",activeColor)}function panelChanger(){var b,a;if(Dir==-1){if(panelIndex<1){for(a=1;a<(endingPanel);a++){panelIndex=a;b=activePosition[panelIndex];$(".panel").eq(panelIndex).css("width",fullPanelWidth).css("display","block").stop().animate({left:b},{speed:aniSpeed},easingMethod)}panelIndex=endingPanel-1}else{b=defaultPosition[panelIndex];$(".panel").eq(panelIndex).css("width",fullPanelWidth).css("display","block").stop().animate({left:b},{speed:aniSpeed},easingMethod);panelIndex--}activateH1(panelIndex)}else{panelIndex++;if(panelIndex<endingPanel){b=activePosition[panelIndex];$(".panel").eq(panelIndex).css("width",fullPanelWidth).css("display","block").stop().animate({left:b},{speed:aniSpeed},easingMethod);activateH1(panelIndex)}else{for(a=1;a<endingPanel;a++){panelIndex=endingPanel-a;b=defaultPosition[panelIndex];$(".panel").eq(panelIndex).css("width",fullPanelWidth).css("display","block").stop().animate({left:b},{speed:aniSpeed},easingMethod)}panelIndex=0;activateH1(panelIndex)}}}function pauseCarousel(){var a="carousel";document.cookie=a+"=0; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";$("#pause").css("display","none");$("#resume").css("display","block");window.clearInterval(rotateTimer)}function ToggleCarousel(){var f="carousel",d,e;var c,g,a,b=-1;if(document.cookie){b=document.cookie.indexOf(f)}if(b==-1){document.cookie=f+"=1; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";b=document.cookie.indexOf(f)}g=(document.cookie.indexOf("=",b)+1);a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}d=window.location.href;e=d.indexOf("/FundingRequest.php");if((e>-1)){c=0;$("#pause").css("display","none");$("#resume").css("display","block")}else{c=document.cookie.substring(g,a);if(c==1){c=0;$("#pause").css("display","none");$("#resume").css("display","block");pauseCarousel()}else{c=1;document.cookie=f+"=1; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";$("#pause").css("display","block");$("#resume").css("display","none");rotateTimer=window.setInterval(panelChanger,viewTime)}}return(c)}function ReadCookie(f){var d=1;var g,a,b,e;var c=window.location.href;e=c.indexOf("/FundingRequest.php");if((f=="carousel")&&(e>-1)){return(0)}if(document.cookie){b=document.cookie.indexOf(f);if(b!=-1){g=(document.cookie.indexOf("=",b)+1);a=document.cookie.indexOf(";",b);if(a==-1){a=document.cookie.length}d=document.cookie.substring(g,a)}}return(d)}function housekeepingStuff(){var c,d,b,a;for(c=startingPanel;c<endingPanel;c++){d=(-24*c+"px 0");$($("h3").get(c-startingPanel)).css("backgroundPosition",d);$($("h3").get(c-startingPanel)).css("backgroundColor",defaultColor);if((c-startingPanel)==0){$("h3").css("backgroundColor",activeColor)}}endingPanel=endingPanel-startingPanel;panelIndex=startingPanel=0;$("h3").each(function(f){$(this).addClass("index_"+f);c=f+5;$(".panel").eq(f).css("zIndex",c);if(f==endingPanel){$(this).addClass("last_index")}});var e=fullPanelWidth+(h3Width*(endingPanel-2));for(c=endingPanel;c>0;c--){b=e-((c-1)*h3Width);defaultPosition[endingPanel-c]=b}for(c=0;c<endingPanel;c++){b=c*h3Width;activePosition[c]=b;$(".panel").eq(c).css("width",h3Width).css("left",defaultPosition[c])}a=(738-e)+"px";$(".featuretteMask").css("width",a)}function rotateAccordion(){housekeepingStuff();$(".panel").eq(0).css("width",fullPanelWidth).css("display","block").filter(":not(:animated)").stop().animate({left:0},{speed:aniSpeed},easingMethod);var a=ReadCookie("carousel");if(a==1){rotateTimer=window.setInterval(panelChanger,viewTime);$("#pause").css("display","block");$("#resume").css("display","none")}else{window.clearInterval(rotateTimer);$("#pause").css("display","none");$("#resume").css("display","block")}}function currentTab(){if($(".tab_selected").hasClass("startTab")==true){return(0)}if($(".tab_selected").hasClass("pofTab")==true){return(1)}if($(".tab_selected").hasClass("pppTab")==true){return(2)}if($(".tab_selected").hasClass("ifTab")==true){return(3)}if($(".tab_selected").hasClass("ilTab")==true){return(4)}if($(".tab_selected").hasClass("clTab")==true){return(5)}if($(".tab_selected").hasClass("frTab")==true){return(6)}}$(document).ready(function(){$("#prevButton").click(function(){var t;t=currentTab()-1;$(".tab_selected").addClass("tab").removeClass(".tab_selected");if(t<0){t=6}location.href=$(".tab").eq(t).attr("href")});$("#nextButton").click(function(){var t;$(".tab_selected").addClass("tab").removeClass(".tab_selected");t=currentTab()+1;if(t>6){t=0}location.href=$(".tab").eq(t).attr("href")});$(".pauseResume").click(function(){ToggleCarousel()});$("#backwardOne").click(function(){pauseCarousel();Dir=-1;panelChanger();Dir=1});$("#forwardOne").click(function(){pauseCarousel();panelChanger()});$(".h3Wrapper").hover(function(){$(this).find(".h3Shine").css("opacity","0.6").css("backgroundPositionY",-300).animate({backgroundPositionY:300},700)},function(){$(this).find(".h3Shine").css("opacity","1").css("backgroundPositionY",-550).animate({backgroundPositionY:550},700)});$("h3").click(function(){var v;var u=$(this).attr("class");var t=parseInt(u.substring(6),10);if(panelIndex<t){for(v=panelIndex;v<t;v++){$("#forwardOne").trigger("click")}}if(panelIndex>t){for(v=panelIndex;v>t;v--){$("#backwardOne").trigger("click")}}});$(".cnTab").toggle(function(){$("#contactPanel").css("display","block");$("#carouselControls, #speedSlider").css("display","none");$(".feature").css("borderColor","#fff");$("#extraTabsContainer").stop().animate({height:420,top:0,backgroundColor:defaultColor},{speed:"slow"},easingMethod)},function(){$(".feature").css("borderColor","#025167");$("#extraTabsContainer").stop().animate({height:0,top:420,backgroundColor:defaultBackground},{speed:"slow"},easingMethod);$("#carouselControls").css("display","block");$("#contactPanel").css("display","none")});var c=false;var o=false;if(c==true){$("#planeDebugForm").css("display","block")}if(o==true){$("#requestDebugForm").css("display","block");$("#eventsDebugForm").css("display","block");$("#Bubble").css("display","block")}function p(){var u=Math.floor(Math.random()*6);var t=Math.floor(Math.random()*700);var v=Math.floor(Math.random()*2000)+12000;document.getElementById("mdelay1").value=0;$("#plane1").css("visibility","visible");$("#plane1").css("top",t);$("#plane1").css("left","-10px");$("#plane1").css("visibility","visible");document.getElementById("mdelay1").value=v/1000;document.getElementById("functionName1").value="littlePlane1()";document.getElementById("top1").value=t;document.getElementById("left1").value="-10px";document.getElementById("topdest1").value="+=110px";document.getElementById("leftdest1").value="1400px";document.getElementById("Easing1").value=EaseType[u];$("#plane1").animate({left:1400,top:"+=110"},6000,EaseType[u])}function n(){var u=Math.floor(Math.random()*6);var t=Math.floor(Math.random()*700);var v=Math.floor(Math.random()*2000)+6000;document.getElementById("mdelay2").value=0;$("#plane2").css("visibility","visible");$("#plane2").css("top",t);$("#plane2").css("left","1400px");$("#plane2").css("visibility","visible");document.getElementById("mdelay2").value=v/1000;document.getElementById("functionName2").value="littlePlane2()";document.getElementById("top2").value=t;document.getElementById("left2").value="1400px";document.getElementById("topdest2").value="-=180px";document.getElementById("leftdest2").value="-80px";document.getElementById("Easing2").value=EaseType[u];$("#plane2").animate({left:"-80px",top:"-=180"},6000,EaseType[u])}function j(v){var w,t,u;if(document.cookie){u=document.cookie.indexOf(v)}else{u=-1}if(u==-1){if(v=="firstTime"){document.cookie=v+"=Y; expires=Wednesday, 01-Aug-2040 08:00:00 GMT"}else{document.cookie=v+"=0; expires=Wednesday, 01-Aug-2040 08:00:00 GMT"}}w=(document.cookie.indexOf("=",u)+1);t=document.cookie.indexOf(";",u);if(t==-1){t=document.cookie.length}var x=document.cookie.substring(w,t);if(x==1){document.cookie=v+"=0; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";$("#ShowHide").html("Hide Planes");x=0}else{if(x==0){document.cookie=v+"=1; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";$("#ShowHide").html("Show Planes");x=1}}if(x=="Y"){document.cookie=v+"=N; expires=Wednesday, 01-Aug-2040 08:00:00 GMT";x="Y"}return(x)}$("#ShowHide").hover(function(){$(this).css("cursor","pointer").css("backgroundColor","#fff").css("color","blue")},function(){$(this).css("cursor","default").css("backgroundColor","transparent").css("color","#007")});var i=ReadCookie("ShowPlanes");if(i==0){p();n();timerId1=window.setInterval(p,7000);timerId2=window.setInterval(n,7000);cookieLabel="Hide Planes"}else{$("#plane1").css("visibility","hidden");$("#plane2").css("visibility","hidden");window.clearInterval(timerId1);window.clearInterval(timerId2);cookieLabel="Show Planes"}$("#ShowHide").html(cookieLabel).css("font-weight","900").css("color","#007");$("#ShowHide").click(function(){if(j("ShowPlanes")==0){p();n();timerId1=window.setInterval(p,7000);timerId2=window.setInterval(n,7000);cookieLabel="Hide Planes"}else{$("#plane1").css("visibility","hidden");$("#plane2").css("visibility","hidden");window.clearInterval(timerId1);window.clearInterval(timerId2)}});$(".rounded").corner();$("#featureElementsContainer").corner();$(".startTab").corner();$(".pofTab").corner();$(".pppTab").corner();$(".ifTab").corner();$(".ilTab").corner();$(".clTab").corner();$(".frTab").corner();$(".cnTab").corner();$("#FeedbackButton").uncorner().corner("right");if($.browser.msie!==true){$(".feature").corner("8px")}$("#featureElementsContainer").corner("bottom 16px");$(".hrDiv").corner("round 8px").parent().css("padding","8px").corner("round 16px");function f(){$("#container200").css("width","95px");$(".nonFeedback").fadeTo("fast",1);$("#Content2New").css("display","none")}var k,g,b,r,q=0;$("#FeedbackButton").toggle(function(t){$(".nonFeedback").fadeTo("fast",0.2,function(u){$("#container200").css("width","440px");$("#slide-panel201").show("blind",{direction:"left"},"slow").stop()});t.preventDefault()},function(t){$("#slide-panel201").hide("blind",{direction:"left"},"slow",function(){f()});t.preventDefault()});$("#cancel202").click(function(t){q=0;$("#slide-panel201").hide("blind",{direction:"left"},"slow",function(){f()});t.preventDefault()});$("#submit202").click(function(t){k=$("input[name=visitorname]");g=$("input[name=email]");b=$("textarea[name=feedbacktext]");r="visitorname="+k.val()+"&email="+g.val()+"&feedback="+b.val();$(".feedbackfield").attr("disabled","true");$.ajax({url:"SendFeedback.php",type:"GET",data:r,cache:false,success:function(u){if(u==1){$(".block202").hide();$("#done202").fadeIn("slow")}else{alert("Sorry, unexpected AJAX error\n|"+u+"|\nPlease try again.");$(".feedbackfield").removeAttr("disabled");$(".loading202").hide()}}});q=0;$("#slide-panel201").hide("blind",{direction:"left"},"slow",function(){f()});t.preventDefault()});if(a==undefined){var a=460}$("#windowClose").click(function(){$(".pageCatcher").hide()});$("#windowMax").click(function(){$("#windowMax").hide();$("#windowMin").show();$("#windowContent").css("height",(a-40)+"px");$(".pageCatcher").css("height",a+"px")});$("#windowMin").click(function(){$("#windowMin").hide();$("#windowMax").show();$(".pageCatcher").css("height","30px")});$("#windowTopContent").toggle(function(){$("#windowMax").hide();$("#windowMin").show();$("#windowContent").css("height",(a-40)+"px");$(".pageCatcher").css("height",a+"px")},function(){$("#windowMin").hide();$("#windowMax").show();$(".pageCatcher").css("height","30px")});var d="<p class='eyeText'>It looks like you've never visited this website. No problem.</p><p class='eyeText'>Here's a tip: The website is split into 5 major web pages, discussing each of our products.</p><p class='eyeText'>They are represented by the tab menu on top, along with 'Home' and 'Funding Request.'</p><p class='eyeText'>Within each web page are a set of slides that are controled by the 3 buttons, for <i>back 1 slide, pause/resume, and forward 1 slide</i>. They slides scroll much too fast to be completely read so press the pause button. When paused, you can still scroll through the slides.</p><p class='eyeText'>Did we say 'Welcome'?</p><p class='eyeText'>Please have fun, learn a lot, and perhaps submit a funding request if a product looks like it fits your need.</p>";var h="Welcome To Our Website!";$("#windowContent").html(d).addClass("Resizable").addClass("rounded");$("#windowTopContent").html(h);if(j("firstTime")=="Y"){$(".pageCatcher").css("display","block").css("height","450px").corner().resizable({alsoResize:".Resizable",maxHeight:470,minHeight:30,minWidth:250}).draggable().fadeTo("fast",0.85).animate({top:"35%",left:"35%"},500,easingMethod);$("#windowTopContent").click()}function e(){var t=$("#speedSlider").slider("option","value");viewTime=6000-(t*500);if(ReadCookie("carousel")==1){window.clearInterval(rotateTimer);rotateTimer=window.setInterval(panelChanger,viewTime)}}$("#speedSlider").slider({animate:true,step:1,range:"min",min:1,orientation:"horizontal",max:10,value:5,stop:function(t,u){e()}});var l="slow";var m="medium";var s="fast";$("#speedSlider").css("backgroundColor",defaultColor);$("#speedSlider  .ui-slider-range").css("backgroundColor",activeColor);$("#speedSlider a.ui-slider-handle").css("backgroundColor",defaultColor);$("#speedSlider a.ui-slider-handle").hover(function(){$(this).css("backgroundColor",activeColor)},function(){$(this).css("backgroundColor",defaultColor)});$(".featurette").css("display","block");$("#para").html(newHTML+mmail);$("#eemail").html(mmail)});function loanSpecial(){popDialog="<p>If you have a strong banking relationship with your bank we can bring a JV partner ";popDialog+="on your behalf to secure a commercial loan. The JV partner will come to the table with ";popDialog+="any  collateral that is acceptable to your bank to secure the loan. Process only takes ";popDialog+="15-30 days. In order for us to consider your project please forward:</p>";popDialog+="<ul><li>A 1 or 2 page summary of your project</li>";popDialog+="<li>A Client Information Sheet</li></ul>";var a=$('<div class="dialogBox"></div>').html(popDialog).dialog({autoOpen:true,title:"Are you Looking For a JV Partner?",zIndex:355,width:500,buttons:{Okay:function(){$(this).dialog("close")}},beforeclose:function(){$(this).parent().hide("slide",{direction:"right"},2000);return(false)}})}function insuranceWraps(){popDialog="<p>Have a mine or other asset? We are now offering<br/>";popDialog+="insurance wraps of assets for 4%. This offer is on a<br/>";popDialog+="limited basis. Contact us for details.</p>";var a=$('<div class="dialogBox"></div>').html(popDialog).dialog({autoOpen:true,title:"New Offering: Insurance Wraps",zIndex:355,width:400,buttons:{Okay:function(){$(this).dialog("close")}},beforeclose:function(){$(this).parent().hide("slide",{direction:"right"},2000);return(false)}})}function adjustColors(){var c=99,b,d,a;b=window.location.pathname;d=b.lastIndexOf("\\");if(d<1){d=b.lastIndexOf("/")}a=b.substr(d+1);if((a=="FundingRequest.php")||(a=="FundingRequestSent.php")){$(".frTab").addClass("tab_selected").removeClass("tab");c=6}else{if(a=="CommercialLoans.php"){c=5;loanSpecial()}else{if(a=="BankInstrumentFinancing.php"){c=3}else{if(a=="BankInstrumentLeasing.php"){c=4}else{if(a=="ProofOfFunds.php"){c=1}else{if(a=="PrivatePlacementProgram.php"){c=2;insuranceWraps()}else{if((a=="index.php")||(a.length==0)){c=0}}}}}}if(c<7){$(".tab").eq(c).addClass("tab_selected").removeClass("tab")}}if(c==99){$(".feature").css("overflow-y","auto")}if(a=="Glossay.php"){$(".feature").css("overflow-y","hidden")}}jQuery.event.add(window,"load",adjustColors);function BiggerFontSize(c){var e,a,b,d;e=document.getElementsByTagName(c);a=20;for(b=0;b<e.length;b++){if(e[b].style.fontSize){d=parseInt(e[b].style.fontSize.replace("px",""),10)}else{d=12}if(d!=a){d+=1}e[b].style.fontSize=d+"px"}}function SmallerFontSize(c){var e,d,b,a;e=document.getElementsByTagName(c);b=8;for(a=0;a<e.length;a++){if(e[a].style.fontSize){d=parseInt(e[a].style.fontSize.replace("px",""),10)}else{d=12}if(d!=b){d-=1}e[a].style.fontSize=d+"px"}}function increaseFontSize(){BiggerFontSize("p");BiggerFontSize("li")}function decreaseFontSize(){SmallerFontSize("p");SmallerFontSize("li")};