$(document).ready(function() {
    //Examples of how to assign the ColorBox event to elements
	$(".example7").colorbox({width:"475", height:"335", iframe:true});
	$(".contactForm").colorbox({width:"500", height:"630", iframe:true});
	$(".got-a-maintenance-question").colorbox({width:"500", height:"630", iframe:true});
	$(".need-a-quote").colorbox({width:"500", height:"630", iframe:true});

	//Example of preserving a JavaScript event for inline calls.
	$("#click").click(function(){
	$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});


$("#click").click(function(){
	$('#click').css({"background-color":"#f00", "color":"#fff", "cursor":"inherit"}).text("Open this window again and this message will still be here.");
		return false;
	});
        
        $('input').each(function(index){
        if($(this).val()==""){
          $(this).val($(this).attr('placeholder'));
        }
        });
        
        $('input').focus(function(){
            if($(this).val()==$(this).attr('placeholder')){
          $(this).val('');
        }
        });
        
        $('input').blur(function(){
           if($(this).val()==""){
          $(this).val($(this).attr('placeholder'));
        }
        });
        
        $('textarea').each(function(index){
        if($(this).val()==""){
          $(this).val($(this).attr('placeholder'));
        }
        });
        
        $('textarea').focus(function(){
            if($(this).val()==$(this).attr('placeholder')){
          $(this).val('');
        }
        });
        
        $('textarea').blur(function(){
           if($(this).val()==""){
          $(this).val($(this).attr('placeholder'));
        }
        });


$("#callbackform").submit(function(){
    error=0;
    if($("#callbackform input[name=name]").val()=="" || $("#callbackform input[name=name]").val()=="Full Name"){
        error=1;
    }
    if($("#callbackform input[name=email]").val()=="" || $("#callbackform input[name=email]").val()=="Email"){
        error=1;
    }
    if($("#callbackform input[name=telephone]").val()=="" || $("#callbackform input[name=telephone]").val()=="Telephone"){
        error=1;
    }
    if(error==1){
        alert("Please complete all fields before continuing");
    
    return false;
        
    }
        
     return true;
    
});




$('.accordion').html('<ul><li><span id="a1"><img src="images/telephony.jpg" alt="Telephony" border="0" width="24" height="199" /><p><strong>Telephony</strong></p>	<p>Our ability to provide Voice over IP and Unified Communications Systems will enable our customers to have the best in breed technology for their businesses. We not only provide the complete infrastructure for businesses,	we also provide the value added services that enable us to work as an effective partner for modern businesses, to enable us to develop future strategies to help our customers succeed.</p>	<p class="lower"><img src="http://www.actimax.co.uk/new/telephony_image.jpg" /></p></span></li><li><span><img src="images/data.jpg" alt="Data" border="0" width="24" height="199" />	<p><strong>Data</strong></p><p>Actimax are able to provide MPLS and Ethernet connected networks to enable our customers to have integrated Voice &amp; Data solutions to multiple sites. In addition to this, 	we are also able to provide DSL based technology for multiple remote business workers.</p><p class="lower"><img src="http://www.actimax.co.uk/new/data_image.jpg" /></p></span></li><li><span><img src="images/mobile.jpg" alt="Mobile" border="0" width="24" height="199" /><p><strong>Mobile</strong></p><p>Actimax are an airtime provider with all the major networks and can provide	competitive mobile network solutions. While most suppliers are able to provide customers with mobile solutions, Actimax have considerable expertise in providing Aruba WiFi networks, which enables us to provide a complete mobility	solution, linking the onsite telephony with the Mobile network, in addition to providing the products separately.</p><p class="lower"><img src="http://www.actimax.co.uk/new/mobile_image.jpg" /></p></span></li>	<li><span><img src="images/contact-us.jpg" alt="Contact Us" border="0" width="24" height="199" /><p><strong>Contact Us</strong></p><p>Please fill in the form below and we\'ll contact you shortly...<br />	<form id="contactbox" method="post" action="form_handle/handle.php"><input type="hidden" name="action" value="menu-contact-form">	<table border="0" cellspacing="0" cellpadding="0" width="100%"><tr><td align="right">Name:</td><td><input type="text" name="name" id="name" value="" /></td>	<td align="right">Company:</td><td><input type="text" name="company" id="company" value="" /></td></tr>	<tr><td align="right">Phone:</td><td><input type="text" name="phone" id="phone" value="" /></td><td align="right">Email:</td><td><input type="text" name="email" id="email" value="" /></td></tr>	<tr><td align="right">When to ring?:</td><td><input type="text" name="whenToRing" id="whenToRing" value="" /></td>	<td align="right">Enquiry type:</td><td><select name="enquiryType" id="enquiryType" size="1"><option value="Telephone System">Telephone System</option><option value="Maintenance">Maintenance</option>	<option value="Call Costs">Call Costs</option><option value="Data">Data</option><option value="NGN\'s">NGN\'s</option><option value="Other">Other</option></select></td></tr>	<tr><td align="center" colspan="4"><input name="submit" id="submit" value="Submit" class="go" type="submit" /></td></tr></table></form></p></span></li></ul>');
        

//	<li><span><img src="images/Offers.jpg" alt="Offers" border="0" width="24" height="199" /><p><strong>Offers</strong></p><p>&pound;100 Marks &amp; Spencer\'s Vouchers with 	every new system purchased before the end of October 2011! For every successful appointment with a quotable opportunity, your business card will be entered into our quarterly iPad draw! 	<a href="/offers-tandcs">Terms and Conditions</a></p><form id="quickcontactbox" method="post" action="form_handle/handle.php"><input type="hidden" name="action" value="offers-contact-form"><table border="0" cellspacing="0" cellpadding="0" width="100%">	<tr><td align="right">Name:</td><td><input type="text" name="name" id="name" value="" /></td><td align="right">Company:</td><td><input type="text" name="company" id="company" value="" /></td></tr>	<tr><td align="right">Phone:</td><td><input type="text" name="phone" id="phone" value="" /></td><td align="right">Email:</td><td><input type="text" name="email" id="email" value="" /></td></tr>	<tr><td align="right">No of employees:</td><td><input type="text" name="numOfEmps" id="numOfEmps" value="" /></td><td colspan="2"><input name="submit" id="submit" value="Submit" class="go" type="submit" /></td></tr></table></form></span>	</li>

		lastBlock = $("#a1");
		maxWidth = 880;
		minWidth = 24;

		$(".accordion span").hover( function(){
			$(lastBlock).animate({width: minWidth+"px"}, { queue:false, duration:400 });
			$(this).animate({width: maxWidth+"px"}, { queue:false, duration:400});
			lastBlock = this;
                    });
                    
$("#contactbox").submit(function(){

    error=0;
    if($("#contactbox input[name=name]").val()==""){
        error=1;
    }
    if($("#contactbox input[name=company]").val()==""){
        error=1;
    }
    if($("#contactbox input[name=phone]").val()==""){
        error=1;
    }
    if(error==1){
        alert("Please enter your name, company name and telephone before continuing");
    
    return false;
        
    }
        
     return true;
    
});

$("#quickcontactbox").submit(function(){

    error=0;
    if($("#quickcontactbox input[name=name]").val()==""){

        error=1;
    }
    if($("#quickcontactbox input[name=company]").val()==""){

        error=1;
    }
    if($("#quickcontactbox input[name=phone]").val()==""){

        error=1;
    }
    if(error==1){
        alert("Please enter your name, company name and telephone before continuing");
    
    return false;
        
    }
        
     return true;
    
});
		

});




Shadowbox.init({
    language: 'en',
    players:  ['iframe'],
    width: 600,
    height: 400
});






