﻿jQuery.noConflict();jQuery(document).ready(function(){if(jQuery('div.call-me-back-form').length){var form_url='http://www.hughesinsurance.co.uk/app/be_e_form.ashx?1='+form;var form_element_id=jQuery('form').attr('id');var elements_selector='#'+form_element_id+' #elements';var submit_selector='#'+form_element_id+' #btnSubmit';}
jQuery('a[rel*="external"]').click(function(){this.target='_blank';});jQuery('a[rel*="popup-button"]').click(function(){this.target='_blank';});jQuery('.noclick').click(function(){return false;});jQuery(document).pngFix();jQuery(function(){jQuery("#communication-centre").accordion({collapsible:true,animated:false,autoHeight:false,active:false});jQuery("#communication-centre").accordion("option","icons",false);jQuery(function(){jQuery("#body-container").tabs();});});jQuery("a.popup-win-ogi").data("popup-win-ogi",{width:jQuery(document).width(),height:jQuery(document).height(),top:0,left:0});jQuery("a.popup-win-travel").data("popup-win-travel",{width:980,height:600,top:50,left:50});jQuery("a.popup-win-business").data("popup-win-business",{width:980,height:600,top:50,left:50});if(jQuery('#hughes-insurance-locations').length){jQuery("map *").tooltip({positionLeft:true});};jQuery(function(){var els=jQuery('#body-container-right2 img').get();var img_on=Math.floor(Math.random()*els.length)
jQuery('#body-container-right2 img').hide();jQuery('#body-container-right2 img:eq('+img_on+')').show();});jQuery(function(){var oldButton=jQuery("#communication-centre input[type=button]");var newButton=jQuery('<input type="image" />');newButton.attr("id","btnSubmit");newButton.attr("name","btnSubmit");newButton.attr("value","Submit");newButton.attr("alt","Call Me");newButton.attr("src","siteFiles/images/communication-centre-submit.gif");newButton.insertBefore(oldButton);oldButton.remove();});jQuery('#btnSubmit').click(function(){return false;});jQuery(function(){jQuery("a.popup-win-ogi").each(function(i){jQuery(this).click(function(event){event.preventDefault();var params=jQuery(this).data("popup-win-ogi")||{};if(jQuery(this).attr("target")){params.windowName=jQuery(this).attr("target");var windowObject=UTIL.popup.open(this.href,params);jQuery(this).data("windowObject",windowObject);}});});});jQuery(function(){jQuery("a.popup-win-travel").each(function(i){jQuery(this).click(function(event){event.preventDefault();var params=jQuery(this).data("popup-win-travel")||{};if(jQuery(this).attr("target")){params.windowName=jQuery(this).attr("target");var windowObject=UTIL.popup.open(this.href,params);jQuery(this).data("windowObject",windowObject);}});});});jQuery(function(){jQuery("a.popup-win-business").each(function(i){jQuery(this).click(function(event){event.preventDefault();var params=jQuery(this).data("popup-win-business")||{};if(jQuery(this).attr("target")){params.windowName=jQuery(this).attr("target");var windowObject=UTIL.popup.open(this.href,params);jQuery(this).data("windowObject",windowObject);}});});});});jQuery(function(){jQuery('input#fi10111').live('focusin',function(){if(jQuery(this).val()=="Name"){jQuery(this).val('');}});jQuery('input#fi10111').live('focusout',function(){if(jQuery(this).val()==""){jQuery(this).val('Name');}});jQuery('input#fi10112').live('focusin',function(){if(jQuery(this).val()=="Phone"){jQuery(this).val('');}});jQuery('input#fi10112').live('focusout',function(){if(jQuery(this).val()==""){jQuery(this).val('Phone');}});jQuery('input#fi10113').live('focusin',function(){jQuery(this).datepicker({showOn:'focus',dateFormat:'dd-mm-yy',defaultDate:+0,buttonImage:'/siteFiles/images/calendar-icon.gif',minDate:"-0d",maxDate:"+2y",showButtonPanel:true,buttonText:'Select a date',buttonImageOnly:true,constrainInput:true}).focus();});});jQuery(function(){if(jQuery('#communication-centre').hasClass('active')){jQuery('#communication-centre').accordion('activate',0);};});jQuery(window).load(function(){if(jQuery('.location-map').length){jQuery('.location-map').show();jQuery('#newtownards-map').getLocationMap({latitude:54.584399,longtitude:-5.699308,markerTitle:'Hughes Insurance, Newtownards',officeAddress:'Strangford House, Jubilee road, Newtownards, Co Down BT23 4WN Tel: 028 9181 7375'});jQuery('#ballynahinch-map').getLocationMap({latitude:54.40131,longtitude:-5.897368,markerTitle:'Hughes Insurance, Ballynahinch',officeAddress:'22 High Street, Ballynahinch, Co Down BT24 8AL Tel: 028 9182 9280'});jQuery('#magherafelt-map').getLocationMap({latitude:54.755818,longtitude:-6.607408,markerTitle:'Hughes Insurance, Magherafelt',officeAddress:'9 Broad Street, Magherafelt, Co Londonderry BT45 6EB Tel: 028 9182 9240'});jQuery('#ballymena-map').getLocationMap({latitude:54.866934,longtitude:-6.275179,markerTitle:'Hughes Insurance, Ballymena',officeAddress:'9 Greenvale Street, Ballymena, Co Antrim BT43 6AR Tel: 028 9182 9260'});jQuery('#portadown-map').getLocationMap({latitude:54.420063,longtitude:-6.445384,markerTitle:'Hughes Insurance, Portadown',officeAddress:'17a Hanover Street, Portadown, Co Armagh BT62 3ER Tel: 028 9182 9290'});jQuery('#lisburn-map').getLocationMap({latitude:54.513053,longtitude:-6.047065,markerTitle:'Hughes Insurance, Lisburn',officeAddress:'36 Bachelors Walk, Lisburn, Co Antrim BT28 1XN Tel: 028 9182 9230'});jQuery('#newtownabbey-map').getLocationMap({latitude:54.670517,longtitude:-5.957694,markerTitle:'Hughes Insurance, Newtownabbey',officeAddress:'297 Antrim Road, Glengormley, Newtonabbey BT36 7QN Tel: 028 9182 9270'});jQuery('#londonderry-map').getLocationMap({latitude:54.99590,longtitude:-7.32080,markerTitle:'Hughes Insurance, Londonderry',officeAddress:'13 Shipquay St, Londonderry, Co Londonderry BT48 6DJ Tel: 028 9182 9250'});jQuery('#omagh-map').getLocationMap({latitude:54.600157,longtitude:-7.299884,markerTitle:'Hughes Insurance, Omagh',officeAddress:'13 Market Street, Omagh, Co Tyrone BT78 1EE Tel: 028 8224 4499'});jQuery('#belfast-map').getLocationMap({latitude:54.580622,longtitude:-5.977768,markerTitle:'Hughes Insurance, Belfast',officeAddress:'Unit 12, Kennedy Centre, Belfast BT11 9AE Tel: 028 9062 6677'});jQuery('#newry-map').getLocationMap({latitude:54.175478,longtitude:-6.337854,markerTitle:'Hughes Insurance, Newry',officeAddress:'65 Hill Street, Newry, Co Down BT34 1AF Tel: 028 3026 7888'});jQuery('#coleraine-map').getLocationMap({latitude:55.131398,longtitude:-6.671159,markerTitle:'Hughes Insurance, Coleraine',officeAddress:'3 The Diamond, Coleraine, Co Londonderry BT52 1DE Tel: 028 7034 3777'});};});



