$(document).ready(function(){$("div.bubble").bubble({trigger:".trigger",popup:".popup",distance:10,hideDelay:500,effectTime:250});playTime2();var f=0;var c=0;var b=1;var e="env_report=REMOTE_HOST,REMOTE_ADDR,HTTP_USER_AGENT,AUTH_TYPE,REMOTE_USER&recipients=support@mojo301.com&derive_fields=realname=name, email=email&mail_options=Exclude=x;y,NoEmpty&subject=New enquiry received!&template_list_sep=<br />&mail_options=HTMLTemplate=enquiry.htm,TemplateMissing=N/A,NoPlain&";var g=e;$("#receptionist,#main-nav img[alt=Contact Us]").click(function(){if($("#chatbox").css("display")=="none"){initializeChatBox();f=$("#chatwindow-message-inner").innerHeight()}});$("#chatbox #chathead a").click(function(){$("#chatbox").animate({marginTop:"240px"},{duration:1000,easing:"easeInOutCirc"});setTimeout(function(){$("#chatbox").css({display:"none"});$("#chatwindow-message-inner").css({marginTop:"0px"})},1000)});$("#chatinput").keyup(function(h){if(h.keyCode==13){$("#chatsend").click()}});$("#chatcontrols img").hover(function(){var h=$(this).attr("src").split("/");h=h[3].split(".");h=h[0].split("-");$(this).attr({src:"images/uno/chat/chat-"+h[1]+"2.png"});$(this).attr({id:h[1]});$(this).after('<div class="cc-hover">'+returnChatControl($(this).attr("id"))+"</div>").parent("a").children("div").fadeIn(2000)},function(){$(this).attr({src:"images/uno/chat/chat-"+$(this).attr("id")+".png"});$(this).parent("a").children("div").css({display:"none"})});$("#chatcontrols a").click(function(){if($(this).children("img").attr("id")=="enquiry"){$("#chatinput").attr({value:"service"})}else{if($(this).children("img").attr("id")=="contact"){$("#chatinput").attr({value:"contact"})}else{$("#chatinput").attr({value:"help"})}}$("#chatsend").click()});$("#chatsend").click(function(){if($("#chatinput").val()!=""){var i=0;$("#chatwindow-message-inner").append('<p class="newmsg"><b class="usermsg">You say:</b> '+getEmoticon($("#chatinput").val())+"</p>");f=f+$("#chatwindow-message-inner").children("p:last").innerHeight();if(f>130){i=f-130;$("#chatwindow-message-inner").animate({marginTop:"-="+i+"px"});f=f-i}if(c==1){var h=validateChatMsg($("#chatinput").val(),b).split("|");if(h[2]>b){g=g+h[3]+"="+$("#chatinput").val();b++;if(b==5){c=0;b=1;$.ajax({type:"POST",url:"forms/formmail.php",data:g,success:function(){g=e}})}else{g=g+"&"}}}else{var h=processChatMsg($("#chatinput").val()).split("|")}setTimeout(function(){$("#chatstatus").css({display:"block"})},2000);setTimeout(function(){$("#chatwindow-message-inner").append('<p class="newmsg"><b>Alessandra says:</b> '+h[0]+"</p>");f=f+$("#chatwindow-message-inner").children("p:last").innerHeight();if(f>130){i=f-130;$("#chatwindow-message-inner").animate({marginTop:"-="+i+"px"});f=f-i}$("#chatstatus").css({display:"none"});$("#chatinput").focus().select()},h[1]);if($("#chatinput").val().match(/service/gi)&&c==0){c=1}}});$("#chatinput").focus(function(){$(this).addClass("chatfocus")}).blur(function(){$(this).removeClass("chatfocus")});$("#chatsend").hover(function(){$(this).removeClass("chatsend1");$(this).addClass("chatsend2");$(this).css({cursor:"pointer"})},function(){$(this).removeClass("chatsend2");$(this).addClass("chatsend1");$(this).css({cursor:"default"})});$("#chathead img").hover(function(){$(this).attr({src:"images/uno/chat/close2.png"});$(this).css({cursor:"pointer"})},function(){$(this).attr({src:"images/uno/chat/close1.png"});$(this).css({cursor:"default"})});$("#receptionist, #stv-btn").hover(function(){$(this).css({cursor:"pointer"})},function(){$(this).css({cursor:"default"})});$("#p-txt-1").text("");var a=0;$("#main-nav li a").eq(1).click(function(){if(a==0){playAboutUs();a=1}});var d=0;$("#main-nav li a").eq(2).click(function(){if(d==0){d=1;setTimeout(function(){$("#stv-btn").click()},1500)}});$("#stv-screen[class=screenoff]").css({opacity:0});$("#tv2-screen").css({opacity:0});$("#tv2-screen-inner").css({height:"30px",width:"0px"});$("#webgallery,#graphixgallery").append("<ul></ul>");$("#webgallery").jcarousel({initCallback:mycarousel_initCallback,itemLoadCallback:mycarousel_itemLoadCallback,visible:4,wrap:"both"});$("#graphixgallery").jcarousel({initCallback:mycarousel_initCallback,itemLoadCallback:mycarousel_itemLoadCallback2,visible:4,wrap:"both"});$(".jcarousel-prev-horizontal").addClass("png");$(".jcarousel-next-horizontal").addClass("png");$("#stv-btn").click(function(){if($(this).hasClass("btnlightoff")){d=1;$(this).removeClass().addClass("btnlighton");$("#stv-light").stop(true).find("div").removeClass().addClass("lighton").css({opacity:0}).animate({opacity:1},1000);$("#stv-screen").stop(true).removeClass().addClass("screenon").css({opacity:0}).animate({opacity:1},2000);$("#stv-content").stop(true).css({marginTop:"-200px",marginLeft:"1px"}).animate({marginTop:"10px"},{duration:500,easing:"easeInOutCirc"},500).animate({marginTop:"0px"},500);$("#stv-content ul#sc-nav-bar").tabs({selected:0});buildWebGallery=1;$("#tv2-screen").stop(true).css({opacity:0}).animate({opacity:1},2000);$("#tv2-cover-left").stop(true).animate({left:"-385px"},10000);$("#tv2-cover-right").stop(true).animate({right:"-389px"},10000);setTimeout(function(){$("#tv2-screen-content-inner").html("");$("#tv2-screen-inner").stop(true).animate({opacity:1,width:"746px"},{duration:500,easing:"easeInOutSine"},1000).animate({height:"262px"},{duration:1000,easing:"easeInOutExpo"},500);$("#tv2-welcome").css({display:"block"}).animate({opacity:1},1000)},4000)}else{d=0;$(this).removeClass().addClass("btnlightoff");$("#stv-light").find("div").stop(true).animate({opacity:0},1000);$("#stv-screen[class=screenon]").stop(true).animate({opacity:0},1000);$("#stv-content").animate({marginTop:"-200px"},500);$("#tv2-cover-left").stop(true).animate({left:"0px"},10000);$("#tv2-cover-right").stop(true).animate({right:"0px"},10000);setTimeout(function(){$("#tv2-screen-inner").stop(true).animate({height:"30px"},{duration:500,easing:"easeInOutExpo"},500).animate({width:"0px",opacity:0},500)},1000);setTimeout(function(){$("#tv2-screen").stop(true).animate({opacity:0},1000)},2000)}});if(location.pathname=="/about-us"){$("#main-nav li a").eq(1).trigger("click")}else{if(location.pathname=="/portfolio"){$("#main-nav li a").eq(2).trigger("click")}else{if((location.pathname=="/contact-us")&&($("#chatbox").css("display")=="none")){initializeChatBox();f=$("#chatwindow-message-inner").innerHeight()}}}});$(function(){$.sifr({path:"fonts"})});function initializeChatBox(){$("#chatbox").css({display:"block",marginTop:"240px"}).animate({marginTop:"0px"},{duration:2000,easing:"easeInOutCirc"});var a=processChatMsg("defMsg").split("|");$("#chatwindow-message-inner").html(a[0]);$("#chatinput").val("");return 1}function processChatMsg(d){var b;var c=Math.floor(Math.random()*4);var a=new Array();a[0]="Cool! :)";a[1]="I'm not sure what you meant by that?";a[2]="Umm...ok?";a[3]="Can you re-word what you just typed?";if(d.match("defMsg")){b='<p class="firstmsg"><b>Alessandra says:</b> Hello there and welcome to Mojo New Media Solutions! Please have a look around the office and enjoy your stay! :)</p><p class="newmsg"><b>Alessandra says:</b> Here\'s our contact information for you to get in touch with us! <span class="extra-pad"><b>E-mail</b>: <a href="mailto:support@mojo301.com">support@mojo301.com</a></span><b>Contact Number:</b> 0418 208 254 (local) or +61 418 208 254 (international)</p>'}else{if(d.match(/help/gi)){b='Alessandra to the rescue! :) Type in the following commands should you want to get our contact info or if you want to leave an enquiry so I can pass it on to the appropriate people: <span class="extra-pad"><b><i>service</i></b> - leave an enquiry</span><b><i>contact</i></b> - get our contact information<br /><b><i>email</i></b> - get our email'}else{if(d.match(/service/gi)||d.match(/enquiry/gi)){b="Ok, let's get the ball rolling shall we? May I have your name please?"}else{if(d.match(/contact/gi)||d.match(/get in touch/gi)){b='So you decided to get in contact with us hey? Good move! :) Here\'s our contact information for you to get in touch with us! <span class="extra-pad"><b>E-mail</b>: <a href="mailto:support@mojo301.com">support@mojo301.com</a></span><b>Contact Number:</b> 0418 208 254 (local) or +61 418 208 254 (international)'}else{if(d.match(/email/gi)||d.match(/e-mail/gi)||d.match(/emial/gi)||d.match(/mail/gi)){b='Do you want to email us? Send your email to <a href="mailto:support@mojo301.com">support@mojo301.com</a>. Rest assured that we value your privacy and won\'t be giving it out to anyone!'}else{if(d.match(/your number/gi)||d.match(/number/gi)||d.match(/digits/gi)||d.match(/\#/gi)||d.match(/call/gi)){b="Sorry, I don't usually give out my number to strangers but you can call customer support at 0418 208 254 (local) or +61 418 208 254 (international). :)"}else{if(d.match(/where are you/gi)||d.match(/located/gi)||d.match(/location/gi)){b="We are a web design company based in Sydney, Australia. Where are you from?"}else{if(d.match(/price/gi)||d.match(/cost/gi)||d.match(/quote/gi)||d.match(/how much/gi)){b="For you? Nothing! ;) Nothing that is, but high quality websites for dirt cheap prices! Contact us now and find out!"}else{if(d.match(/portfolio/gi)||d.match(/showcase/gi)){b='See what we\'re made of! Go to the "Showcase" room and turn on the small PC screen right in front of you!'}else{if(d.match(/who are you/gi)||d.match(/who you/gi)||d.match(/who u/gi)||d.match(/who are ya/gi)||d.match(/name/gi)){b="Hi, my name's Alessandra and I'm Mojo New Media Solution's virtual receptionist. How can I help you today?"}else{if(d.match(/hello/gi)||d.match(/hullo/gi)||d.match(/hi/gi)||d.match(/hey/gi)||d.match(/wassup/gi)||d.match(/what\'s up/gi)){b="Hi there! How are you doing today?"}else{if(d.match(/bye/gi)||d.match(/see ya/gi)||d.match(/see u/gi)){b="Loved the chat! Talk to you soon! :)"}else{if(d.match(/gday/gi)||d.match(/g\'day/gi)){b="G'day mate! How's it goin?"}else{if(d.match(/how are you/gi)||d.match(/how are ya/gi)||d.match(/how are u/gi)||d.match(/how r u/gi)){b="I'm doing great thanks. How are you?"}else{if(d.match(/weather/gi)){b="What's the matter? Run out of topics already? ;) The weather over here right now is so nice, not too hot and not too cold! How's the weather on your side?"}else{if(d.match(/a\/s\/l/gi)||d.match(/asl/gi)){b="20 something female from Sydney. Yourself? :)"}else{if(d.match(/fuck/gi)||d.match(/shit/gi)||d.match(/cunt/gi)||d.match(/bitch/gi)||d.match(/bogan/gi)){b="Do you kiss your mother with that mouth? Let's keep it professional please."}else{if(d.match(/whore/gi)||d.match(/skank/gi)||d.match(/slut/gi)){b="I know you are, but what am I?"}else{if(d.match(/stupid/gi)||d.match(/dumb/gi)||d.match(/idiot/gi)){b="I beg to differ. I'm a very intelligent lady thank you very much."}else{if(d.match(/cock/gi)||d.match(/dick/gi)){b="Potty mouth! :p"}else{if(d.match(/blowjob/gi)||d.match(/headjob/gi)){b="Wow! Your success rate with women must be REALLY high!"}else{if(d.match(/sex/gi)||d.match(/intercourse/gi)){b="I'm sorry I like 'em big! :p"}else{if(d.match(/movie/gi)||d.match(/dinner/gi)||d.match(/wanna go out/gi)||d.match(/wanna go on a date/gi)){b="You're going to need to up your game to get with this ;) I'm flattered but sorry, I already have a boyfriend! Can I help you with anything else?"}else{if(d.match(/boyfriend/gi)||d.match(/^bf$/gi)){b="Hehe yes, I have one! Aww, are you heartbroken now? :p"}else{if(d.match(/girlfriend/gi)||d.match(/^gf$/gi)){b="Hmmmm maybe if I'm wildly drunk? Kidding! ;) Anyway, let's get back to business shall we?"}else{if(d.match(/:\(/gi)){b="Aww why so sad?"}else{b=a[c]}}}}}}}}}}}}}}}}}}}}}}}}}}b=getEmoticon(b)+"|"+(b.length+4000);return b}function validateChatMsg(e,g){var b;var c=g;var f;var d=/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/;var a=e.replace(/[\(\)\.\-\ ]/g,"");if(g==1){b="Hi "+e+"! Ok next step, what's your email address?";c=2;f="name"}else{if(g==2){if(!d.test(e)){b="I'm sorry, the email you entered seems to be invalid. Please make sure the format is in [emailname]@[domainname].com format."}else{b="Fantastic! May I have your contact number now please?";c=3;f="email"}}else{if(g==3){if(isNaN(a)){b="I'm sorry, the number you entered seems to be invalid. Please make sure there are no alphabetical or special characters in what you just typed."}else{b="Great, nearly finished! So what was your enquiry about?";c=4;f="number"}}else{if(g==4){b="Your enquiry is being processed as I type this! Thanks for taking the time and have an awesome day! :)";c=5;f="enquiry"}}}}b=getEmoticon(b)+"|"+((b.length*10)+4000)+"|"+c+"|"+f;return b}function getEmoticon(c){var b="images/uno/chat/";var a=c.replace(/:\)/gi,'<img src="'+b+'/happy.gif" />').replace(/:\(/gi,'<img src="'+b+'/sad.gif" />').replace(/;\)/gi,'<img src="'+b+'/winking.gif" />').replace(/:p/gi,'<img src="'+b+'/tongue.gif" />');return a}function returnChatControl(a){if(a=="enquiry"){return"Send enquiry"}else{if(a=="contact"){return"Contact info"}else{return"Help! I'm lost!"}}}function playTime(){var a=(getTime()).split("|");$("#r2-inner").html(a[0]).sifr({color:"#666",font:"Ericsson"});setInterval(function(){var b=(getTime()).split("|");if(b[0]!=a[0]){$("#r2-inner").html(b[0]).sifr({color:"#666",font:"Ericsson"}).append(b[1]);a[0]=b[0];a[1]=b[1]}},1000)}function getTime(){var e=new Date();var a=e.getHours();var b=e.getMinutes();var f;var c;if(a>=12){if(a!=12){a=a-12}f='<img src="images/uno/clock/pm.png" />'}else{if(a==0){a="12"}f='<img src="images/uno/clock/am.png" />'}if(b<10){b="0"+b}c=a+":"+b+"|"+f;return c}function playTime2(){var a=getTime2();$("#r2-inner").html(a);setInterval(function(){if(getTime2()!=a){$("#r2-inner").stop().fadeOut("slow").fadeIn("slow");$("#r2-inner").html(getTime2());a=getTime2()}},1000)}function getTime2(){var g=new Date();var h=g.getHours();var e=g.getMinutes();var m;var k;var l='<div id="t_am" class="t_in png"></div>';var i='<div id="t_pm" class="t_in png"></div>';var b='<div id="t_dot" class="t_in png"></div>';var f='<div id="t_blank" class="t_in"></div>';var c='<div id="t_blank_2" class="t_in"></div>';var a='<div id="t_';var j='" class="t_in png"></div>';if(h>=12){if(h!=12){h=h-12}h=h+"";if(h>=6){$(".w2-view-night").css({display:"block"})}if(h.length==2){h=c+a+h.charAt(0)+j+a+h.charAt(1)+j}else{h=f+a+h.charAt(0)+j}m=i}else{$(".w2-view-night").css({display:"none"});if(h==0){h=c+a+1+j+a+2+j}else{if(h==10||h==11){h=h+"";h=c+a+h.charAt(0)+j+a+h.charAt(1)+j}else{h=h+"";h=f+a+h.charAt(0)+j}}m=l}if(e<10){e=e+"";e=a+0+j+a+e.charAt(0)+j}else{e=e+"";e=a+e.charAt(0)+j+a+e.charAt(1)+j}k='<div id="t_box">'+h+b+e+m+"</div>";return k}function playAboutUs(){$("#p-txt-1").text("");$("#p-txt-2").text("");$("#p-txt-3").text("");$("#p-txt-4").text("");$("#p-txt-5").text("");$("#p-txt-6").text("");$("#p-txt-1").css({opacity:0}).animate({opacity:1},4000);var l=setTimeout(function(){$("#p-txt-1").animate({opacity:0},2000)},8000);var k=setTimeout(function(){$("#p-txt-2").css({display:"block",opacity:0}).animate({opacity:1,width:"690px"},2000)},10000);var j=setTimeout(function(){$("#p-txt-2").animate({opacity:1,width:"0px"},2000)},22000);var i=setTimeout(function(){$("#p-txt-3").css({display:"block",opacity:0}).animate({opacity:1,width:"690px"},2000)},24000);var h=setTimeout(function(){$("#p-txt-3").animate({opacity:1,width:"0px"},2000)},36000);var g=setTimeout(function(){$("#p-txt-4").css({display:"block",opacity:0}).animate({opacity:1,width:"690px"},2000)},38000);var f=setTimeout(function(){$("#p-txt-4").animate({opacity:1,width:"0px"},2000)},50000);var e=setTimeout(function(){$("#p-txt-5").css({display:"block",opacity:0}).animate({opacity:1,width:"690px"},2000)},52000);var d=setTimeout(function(){$("#p-txt-5").animate({opacity:1,width:"0px"},2000)},64000);var c=setTimeout(function(){$("#p-txt-6").css({display:"block",opacity:0}).animate({opacity:1},1000)},68000);var b=setTimeout(function(){$("#p-txt-6").animate({opacity:0},2000)},72000);var a=setTimeout(function(){playAboutUs()},76000)}function mycarousel_itemLoadCallback(b,a){if(a!="init"){return}$.getJSON("scripts/js/json-web.js",function(c){mycarousel_itemAddCallback(b,b.first,b.last,c,"web")})}function mycarousel_itemLoadCallback2(b,a){if(a!="init"){return}$.getJSON("scripts/js/json-graphix.js",function(c){mycarousel_itemAddCallback(b,b.first,b.last,c,"graphics")})}function mycarousel_itemAddCallback(d,e,b,c,a){$.each(c.items,function(f,g){d.add(f+1,'<a href="#" id="'+a+(f+1)+'" onclick="revealBigContent(this, \''+g.media.l+"', '"+(g.title.l).replace(/'/g,"%27")+"', '"+(g.description).replace(/'/g,"%27")+"', '"+g.technology+"', '"+g.url+"','"+(a+(f+1))+'\');return false;" onmouseover="revealBubble(this);return false;" onmouseout="hideBubble(this);return false;"><div style="background: transparent top center no-repeat url(\''+g.media.s+'\');" class="img-box png"></div><div class="poptitle"><div class="bubble-top"></div><div class="poptitle-inner">'+g.title.s+'</div><div class="bubble-btm"></div></div></a>')});d.size(c.items.length)}function revealBubble(a){$(a).children(".poptitle").stop(true).css({display:"block",left:"6px",opacity:1,top:"0px"})}function hideBubble(a){$(a).children(".poptitle").stop(true).animate({top:"-100px"},1000)}function changeImage(a){$(a).attr({src:"images/tres/showcase/launch2.gif"}).effect("bounce",{easing:"linear",times:3})}function returnImage(a){$(a).attr({src:"images/tres/showcase/launch.gif"})}function revealBigContent(d,g,e,i,a,b,c){if(!$("#stv-content #"+c).hasClass("curritem")){var f=g;var h=e;var l=i;var k=a;var j=b;if(j!=""){j='<p><a href="'+b+'" rel="nofollow" target="_blank"><img src="images/tres/showcase/launch.gif" onmouseover="changeImage(this);return false;" onmouseout="returnImage(this); return false;" /></a></p>'}else{j="<p>Website is currently under construction.</p>"}$("#tv2-welcome").animate({opacity:0},1000);setTimeout(function(){$("#tv2-welcome").css({display:"none"})},1000);$("#tv2-screen-content-inner").stop(true).animate({opacity:0.2},1000).animate({marginLeft:"-1000px"},{duration:1000,easing:"easeOutQuart"}).animate({opacity:0}).animate({marginLeft:"2000px"});setTimeout(function(){$("#tv2-loader").stop(true).css({display:"block",opacity:0}).animate({opacity:1},2000)},1000);setTimeout(function(){$("#tv2-screen-content-inner").stop(true).animate({marginLeft:"0px",opacity:1},{duration:5000,easing:"easeInOutCirc"}).html('<div class="sc-screen"><img src="'+f+'" /></div><div class="sc-info"><h2>Client: '+h.replace("%27","'")+"</h2><p><b>What's the story?</b></p><p>"+l.replace("%27","'")+"</p><p><b>What did we do?</b></p><p>"+k.replace("%27","'")+"</p>"+j+"</div>")},2000);setTimeout(function(){$("#tv2-loader").stop(true).animate({opacity:0},1000)},4000);$("#stv-content #"+c).addClass("curritem");$("#stv-content li a").not("#"+c).removeClass("curritem")}}function mycarousel_initCallback(a){a.buttonNext.bind("click",function(){a.startAuto(0)});a.buttonPrev.bind("click",function(){a.startAuto(0)});a.clip.hover(function(){a.stopAuto()},function(){a.startAuto()})}jQuery.easing.BounceEaseOut=function(f,e,a,h,g){if((e/=g)<(1/2.75)){return h*(7.5625*e*e)+a}else{if(e<(2/2.75)){return h*(7.5625*(e-=(1.5/2.75))*e+0.75)+a}else{if(e<(2.5/2.75)){return h*(7.5625*(e-=(2.25/2.75))*e+0.9375)+a}else{return h*(7.5625*(e-=(2.625/2.75))*e+0.984375)+a}}}};(function(a){a.fn.bubble=function(b){var d={trigger:".trigger",popup:".popup",distance:10,hideDelay:500,effectTime:250};var c=a.extend({},d,b);return this.each(function(){var g=null;var f=a(c.trigger,this);var e=a(c.popup,this);a([f.get(0),e.get(0)]).mouseover(function(){if(g){clearTimeout(g)}if(e.is(":animated, :visible")){return}else{e.css({display:"block",top:0,left:20}).animate({opacity:1,top:"-="+c.distance+"px"},c.effectTime)}}).mouseout(function(){if(g){clearTimeout(g)}g=setTimeout(function(){g=null;e.animate({top:"-="+c.distance+"px",opacity:0},c.effectTime,"swing",function(){e.css("display","none")})},c.hideDelay)})})}})(jQuery);