
$(function(){$("a[rel='demo_lightbox']").colorbox({initialWidth:'810',initialHeight:'645',fixedWidth:'810',fixedHeight:'645',modalClose:'',contentPrevious:'',contentNext:'',contentCurrent:'<div class="title">eSureIT Demo</div><div class="caption">Intronis Technologies</div>'});$('#featureCycle').cycle({fx:'fade',speed:300,timeout:5000});$('#quoteCycle').cycle({fx:'scrollUp',speed:600,timeout:9000});$('#portalQuoteCycle').cycle({fx:'fade',speed:600,timeout:9000});$('span.video').hide();$('span.current_video').show();$('a.video-link').click(function(){var video_id=$(this).attr("href").substring(1);$("span.current_video").removeClass("current_video").hide();$("span#"+video_id).addClass("current_video").show();return false;});$('form[name=contact_us]').bind('submit',function(event){var name=$('input#last_name').val();var email=$('input#email').val();var phone=$('input#phone').val();$('input#last_name').val($("<div/>").text($('input#last_name').val()).html());$('input#email').val($("<div/>").text($('input#email').val()).html());$('input#phone').val($("<div/>").text($('input#phone').val()).html());$('input#company').val($("<div/>").text($('input#company').val()).html());$('textarea#00N50000001uNET').val($("<div/>").text($('textarea#00N50000001uNET').val()).html());var error_message='';if(name.length==0){error_message+="Please fill out the Name field.<br/>";}
if(email.length==0){error_message+="Please fill out the Email field.<br/>";}
if(phone.length==0){error_message+="Please fill out the Phone field.<br/>";}
if(error_message.length>0){if($('p.error').text().length>0){$('p.error').html(error_message+'Please try again or email us at <a href="mailto:sales@intronis.com">sales@intronis.com</a>');}
else{$(this).before('<p class="error">'+error_message+'</p>');}
event.preventDefault();}});$('form[name=side_form]').bind('submit',function(event){var name=$('input#last_name').val();var company=$('input#company').val();var email=$('input#email').val();var phone=$('input#phone').val();var months=$('select#months').val();var amount=$('select#amount').val();$('input#last_name').val($("<div/>").text($('input#last_name').val()).html());$('input#email').val($("<div/>").text($('input#email').val()).html());$('input#phone').val($("<div/>").text($('input#phone').val()).html());$('input#company').val($("<div/>").text($('input#company').val()).html());var error_message='';if(name.length==0){error_message+="Please fill out the Name field.<br/>";}
if(company.length==0){error_message+="Please fill out the Company field.<br/>";}
if(email.length==0){error_message+="Please fill out the Email field.<br/>";}
if(phone.length==0){error_message+="Please fill out the Phone field.<br/>";}
if(months!="0-3 months"&&months!="3-6 months"&&months!="6+ months"){error_message+="Please select when you anticipate purchasing online backup.<br/>";}
if(amount!="<250 GB"&&amount!="250-500 GB"&&amount!="500+ GB"){error_message+="Please select how much storage space you will purchase.<br/>";}
if(error_message.length>0){if($('p.error').text().length>0){$('p.error').html(error_message+'Please try again or email us at <a href="mailto:sales@intronis.com">sales@intronis.com</a>');}
else{$(this).before('<p class="error">'+error_message+'</p>');}
event.preventDefault();}});$('form[name=request_consultation]').bind('submit',function(event){var name=$('input#last_name').val();var company=$('input#company').val();var email=$('input#email').val();var phone=$('input#phone').val();var months=$('select#months').val();var amount=$('select#amount').val();$('input#last_name').val($("<div/>").text($('input#last_name').val()).html());$('input#email').val($("<div/>").text($('input#email').val()).html());$('input#phone').val($("<div/>").text($('input#phone').val()).html());$('input#company').val($("<div/>").text($('input#company').val()).html());var error_message='';if(name.length==0){error_message+="Please fill out the Name field.<br/>";}
if(company.length==0){error_message+="Please fill out the Company field.<br/>";}
if(email.length==0){error_message+="Please fill out the Email field.<br/>";}
if(phone.length==0){error_message+="Please fill out the Phone field.<br/>";}
if(months!="0-3 months"&&months!="3-6 months"&&months!="6+ months"){error_message+="Please select when you anticipate purchasing online backup.<br/>";}
if(amount!="<250 GB"&&amount!="250-500 GB"&&amount!="500+ GB"){error_message+="Please select how much storage space you will purchase.<br/>";}
if(error_message.length>0){if($('p.error').text().length>0){$('p.error').html(error_message+'Please try again or email us at <a href="mailto:sales@intronis.com">sales@intronis.com</a>');}
else{$(this).before('<p class="error">'+error_message+'</p>');}
event.preventDefault();}});$(".category_body").hide();$(".category_head").click(function(){$(this).next(".category_body").slideToggle(600);});var $panels=$('#slider .scrollContainer > div');var $container=$('#slider .scrollContainer');var horizontal=false;if(horizontal){$panels.css({'float':'left','position':'relative'});$container.css('width',$panels[0].offsetWidth*$panels.length);}
var $scroll=$('#slider .scroll').css('overflow','hidden');function selectNav(){$(this).parents('ul:first').find('a').removeClass('selected').end().end().addClass('selected');$(".intro, .introHR").hide();}
$('#slider .navigation').find('a').click(selectNav);function trigger(data){var el=$('#slider .navigation').find('a[href$="'+data.id+'"]').get(0);selectNav.call(el);}
if(window.location.hash){trigger({id:window.location.hash.substr(1)});}else{$('ul.navigation a:first').click();}
var offset=parseInt((horizontal?$container.css('paddingTop'):$container.css('paddingLeft'))||0)*-1;var scrollOptions={target:$scroll,items:$panels,navigation:'.navigation a',prev:'img.up',next:'img.down',axis:'xy',onAfter:trigger,offset:offset,duration:500,easing:'swing'};$('#slider').serialScroll(scrollOptions);$('.slider-navigation').localScroll(scrollOptions);scrollOptions.duration=1;$.localScroll.hash(scrollOptions);var NAME_COOKIE='resource_name';var EMAIL_COOKIE='resource_email';var PHONE_COOKIE='resource_phone';var COMPANY_COOKIE='resource_company';var COOKIE_UNINITIALIZED_VALUE='_';var COOKIE_OPTIONS={expires:30};var clicked_link='';$('input#last_name').val(($.cookie(NAME_COOKIE)!=null&&$.cookie(NAME_COOKIE)!=COOKIE_UNINITIALIZED_VALUE)?$.cookie(NAME_COOKIE):'');$('input#email').val(($.cookie(EMAIL_COOKIE)!=null&&$.cookie(EMAIL_COOKIE)!=COOKIE_UNINITIALIZED_VALUE)?$.cookie(EMAIL_COOKIE):'');$('input#phone').val(($.cookie(PHONE_COOKIE)!=null&&$.cookie(PHONE_COOKIE)!=COOKIE_UNINITIALIZED_VALUE)?$.cookie(PHONE_COOKIE):'');$('input#company').val(($.cookie(COMPANY_COOKIE)!=null)?$.cookie(COMPANY_COOKIE):'');$("a#resource_trigger").colorbox({initialWidth:'610',initialHeight:'320',fixedWidth:'610',fixedHeight:'320',modalClose:'',contentPrevious:'',contentNext:'',contentCurrent:'',inline:true,href:"#resource_form"});$('a[rel=Brochure], a[rel=Whitepaper], a[rel=Case Study]').bind('click',function(event){clicked_link=$(this);$('input#00N50000001tT7G').val('Download '+clicked_link.attr("rel"));$('input#00N50000001uNET').val('Downloaded '+clicked_link.text()+'.');$('p.intro').show();$('p.error').remove();if($.cookie(NAME_COOKIE)==null||$.cookie(EMAIL_COOKIE)==null||$.cookie(PHONE_COOKIE)==null){$.cookie(NAME_COOKIE,COOKIE_UNINITIALIZED_VALUE,COOKIE_OPTIONS);$.cookie(EMAIL_COOKIE,COOKIE_UNINITIALIZED_VALUE,COOKIE_OPTIONS);$.cookie(PHONE_COOKIE,COOKIE_UNINITIALIZED_VALUE,COOKIE_OPTIONS);}
else if($.cookie(NAME_COOKIE)!=COOKIE_UNINITIALIZED_VALUE&&$.cookie(NAME_COOKIE).length!=0&&$.cookie(EMAIL_COOKIE)!=COOKIE_UNINITIALIZED_VALUE&&$.cookie(EMAIL_COOKIE).length!=0&&$.cookie(PHONE_COOKIE)!=COOKIE_UNINITIALIZED_VALUE&&$.cookie(PHONE_COOKIE).length!=0){$('form[name=resource]').trigger('submit');event.preventDefault();}
else{$("a#resource_trigger").trigger('click');event.preventDefault();}});$('form[name=resource]').bind('submit',function(event){var name=$('input#last_name').val();var email=$('input#email').val();var phone=$('input#phone').val();var company=$('input#company').val();var error_message='';$.cookie(NAME_COOKIE,name,COOKIE_OPTIONS);$.cookie(EMAIL_COOKIE,email,COOKIE_OPTIONS);$.cookie(PHONE_COOKIE,phone,COOKIE_OPTIONS);$.cookie(COMPANY_COOKIE,company,COOKIE_OPTIONS);if(name.length==0){error_message+="Please fill out the Name field.<br/>";}
if(email.length==0){error_message+="Please fill out the Email field.<br/>";}
if(phone.length==0){error_message+="Please fill out the Phone field.<br/>";}
if(error_message.length>0){if($('p.error').text().length>0){$('p.error').html(error_message+'Please try again or email us at <a href="mailto:sales@intronis.com">sales@intronis.com</a>');}
else{$('p.intro').after('<p class="error span-12">'+error_message+'</p>').hide();}}
else{$('#modalClose').trigger('click');$(this).ajaxSubmit({success:function(){window.location=clicked_link.attr('href');}});}
event.preventDefault();});if(google.loader.ClientLocation!=null){$('form[name=resource] input#city, form[name=contact_us] input#city').val(google.loader.ClientLocation.address.city);$('form[name=resource] input#state, form[name=contact_us] input#state').val(google.loader.ClientLocation.address.region);$('form[name=resource] input#country, form[name=contact_us] input#country').val(google.loader.ClientLocation.address.country);}});