$(function () {
    $(window).scroll(function() {
        if ($(".navbar").offset().top>30) {
            $(".navbar-inner").addClass("sticky");
        }
        else {
            $(".navbar-inner").removeClass("sticky");
        }
    });

    // Flex
    if ($(".flexslider").length) {
        $('.flexslider').flexslider();
    }

    servicesCircle.initialize();

    staticHeader.initialize();

    portfolioItem.initialize();

    //Form Validation
      $(".theme-form").each(function() {
        $(this).validate();
      });

      $(".theme-form").submit(function() {
        var form = $(this);

        if(form.valid()) {
          var url = form.attr("action");
          $.post(url, form.serialize(), function(data, textStatus, jqXHR) {
            if(data && data.success) {
              $(".theme-form #submit").attr("disabled", "disabled").addClass("disabled");
              $(".theme-form-success").slideDown();
            }
          }, "json");
        }

        return false;
      });
  SquareHook.map();
  
  $(".twitter-share-button").css("position", "relative");
});

var portfolioItem = {
    initialize: function () {
        var $container = $("#portfolio_tem .left_box");
        var $bigPics = $container.find(".big img");
        var $thumbs = $container.find(".thumbs .thumb");

        $bigPics.hide().eq(0).show();

        $thumbs.click(function (e) {
            e.preventDefault();
            var index = $thumbs.index(this);
            $bigPics.fadeOut();
            $bigPics.eq(index).fadeIn();
        });
    }
}

var staticHeader = {
    initialize: function () {
        if ($(".navbar-static-top").length) {
            $("body").css("padding-top", 0);
        }
    }
}

var servicesCircle = {
    initialize: function () {
        var $container = $(".services_circles");
        var $texts = $container.find(".description .text");
        var $circles = $container.find(".areas .circle");

        $circles.click(function () {
            var index = $circles.index(this);
            $texts.fadeOut();
            $texts.eq(index).fadeIn();
            $circles.removeClass("active");
            $(this).addClass("active");
        });
    }
}

var SquareHook = window.SquareHook || {};

SquareHook.map = function(){
	if($('.map-area').length > 0)
	{

		$('.map-area').each(function(i,e){

			$map = $(e);
			$map_id = $map.attr('id');
			$map_lat = $map.attr('data-mapLat');
			$map_lon = $map.attr('data-mapLon');
			$map_zoom = parseInt($map.attr('data-mapZoom'));
			$map_title = $map.attr('data-mapTitle');
			
			
			
			var latlng = new google.maps.LatLng($map_lat, $map_lon);			
			var options = { 
				scrollwheel: false,
				draggable: false, 
				zoomControl: false,
				disableDoubleClickZoom: false,
				disableDefaultUI: true,
				zoom: $map_zoom,
				center: latlng,
				mapTypeId: google.maps.MapTypeId.ROADMAP
			};
			
			var styles = [ 
							{
							  stylers: [
								{ hue: "#2F3238" },
								{ saturation: -20 }
							  ]
							}, {
								featureType: "road",
								elementType: "geometry",
								stylers: [
									{ lightness: 100 },
									{ visibility: "simplified" }
							  ]
							}, {
								featureType: "road",
								elementType: "labels",
								stylers: [
									{ visibility: "off" }
							  ]
							}
						];
			
			var styledMap = new google.maps.StyledMapType(styles,{name: "Styled Map"});
			
			var map = new google.maps.Map(document.getElementById($map_id), options);
		
			var image = '//cdn-west.sqhk.co/51b796321563b51308c383c1/marker.png';
			var marker = new google.maps.Marker({
				position: latlng,
				map: map,
				title: $map_title,
				icon: image
			});
			
			map.mapTypes.set('map_style', styledMap);
  			map.setMapTypeId('map_style');
			
			var contentString = '<p><strong>SquareHook</strong><br>423 W 800 S, Suite A301<br /> Salt Lake City, UT 84101</p>';
       
			var infowindow = new google.maps.InfoWindow({
				content: contentString
			});
			
			google.maps.event.addListener(marker, 'click', function() {
      			infowindow.open(map,marker);
    		});

		});
	}	
}

jQuery.easing.jswing = jQuery.easing.swing;
jQuery.extend(jQuery.easing, {
    def: "easeOutQuad",
    swing: function (e, f, a, h, g) {
        return jQuery.easing[jQuery.easing.def](e, f, a, h, g)
    },
    easeInQuad: function (e, f, a, h, g) {
        return h * (f /= g) * f + a
    },
    easeOutQuad: function (e, f, a, h, g) {
        return -h * (f /= g) * (f - 2) + a
    },
    easeInOutQuad: function (e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f + a
        }
        return -h / 2 * ((--f) * (f - 2) - 1) + a
    },
    easeInCubic: function (e, f, a, h, g) {
        return h * (f /= g) * f * f + a
    },
    easeOutCubic: function (e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f + 1) + a
    },
    easeInOutCubic: function (e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f + 2) + a
    },
    easeInQuart: function (e, f, a, h, g) {
        return h * (f /= g) * f * f * f + a
    },
    easeOutQuart: function (e, f, a, h, g) {
        return -h * ((f = f / g - 1) * f * f * f - 1) + a
    },
    easeInOutQuart: function (e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f + a
        }
        return -h / 2 * ((f -= 2) * f * f * f - 2) + a
    },
    easeInQuint: function (e, f, a, h, g) {
        return h * (f /= g) * f * f * f * f + a
    },
    easeOutQuint: function (e, f, a, h, g) {
        return h * ((f = f / g - 1) * f * f * f * f + 1) + a
    },
    easeInOutQuint: function (e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return h / 2 * f * f * f * f * f + a
        }
        return h / 2 * ((f -= 2) * f * f * f * f + 2) + a
    },
    easeInSine: function (e, f, a, h, g) {
        return -h * Math.cos(f / g * (Math.PI / 2)) + h + a
    },
    easeOutSine: function (e, f, a, h, g) {
        return h * Math.sin(f / g * (Math.PI / 2)) + a
    },
    easeInOutSine: function (e, f, a, h, g) {
        return -h / 2 * (Math.cos(Math.PI * f / g) - 1) + a
    },
    easeInExpo: function (e, f, a, h, g) {
        return (f == 0) ? a : h * Math.pow(2, 10 * (f / g - 1)) + a
    },
    easeOutExpo: function (e, f, a, h, g) {
        return (f == g) ? a + h : h * (-Math.pow(2, -10 * f / g) + 1) + a
    },
    easeInOutExpo: function (e, f, a, h, g) {
        if (f == 0) {
            return a
        }
        if (f == g) {
            return a + h
        }
        if ((f /= g / 2) < 1) {
            return h / 2 * Math.pow(2, 10 * (f - 1)) + a
        }
        return h / 2 * (-Math.pow(2, -10 * --f) + 2) + a
    },
    easeInCirc: function (e, f, a, h, g) {
        return -h * (Math.sqrt(1 - (f /= g) * f) - 1) + a
    },
    easeOutCirc: function (e, f, a, h, g) {
        return h * Math.sqrt(1 - (f = f / g - 1) * f) + a
    },
    easeInOutCirc: function (e, f, a, h, g) {
        if ((f /= g / 2) < 1) {
            return -h / 2 * (Math.sqrt(1 - f * f) - 1) + a
        }
        return h / 2 * (Math.sqrt(1 - (f -= 2) * f) + 1) + a
    },
    easeInElastic: function (f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return -(g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
    },
    easeOutElastic: function (f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k) == 1) {
            return e + l
        }
        if (!j) {
            j = k * 0.3
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        return g * Math.pow(2, -10 * h) * Math.sin((h * k - i) * (2 * Math.PI) / j) + l + e
    },
    easeInOutElastic: function (f, h, e, l, k) {
        var i = 1.70158;
        var j = 0;
        var g = l;
        if (h == 0) {
            return e
        }
        if ((h /= k / 2) == 2) {
            return e + l
        }
        if (!j) {
            j = k * (0.3 * 1.5)
        }
        if (g < Math.abs(l)) {
            g = l;
            var i = j / 4
        } else {
            var i = j / (2 * Math.PI) * Math.asin(l / g)
        }
        if (h < 1) {
            return -0.5 * (g * Math.pow(2, 10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j)) + e
        }
        return g * Math.pow(2, -10 * (h -= 1)) * Math.sin((h * k - i) * (2 * Math.PI) / j) * 0.5 + l + e
    },
    easeInBack: function (e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        return i * (f /= h) * f * ((g + 1) * f - g) + a
    },
    easeOutBack: function (e, f, a, i, h, g) {
        if (g == undefined) {
            g = 0.70158
        }
        return i * ((f = f / h - 1) * f * ((g + 1) * f + g) + 1) + a
    },
    easeInOutBack: function (e, f, a, i, h, g) {
        if (g == undefined) {
            g = 1.70158
        }
        if ((f /= h / 2) < 1) {
            return i / 2 * (f * f * (((g *= (1.525)) + 1) * f - g)) + a
        }
        return i / 2 * ((f -= 2) * f * (((g *= (1.525)) + 1) * f + g) + 2) + a
    },
    easeInBounce: function (e, f, a, h, g) {
        return h - jQuery.easing.easeOutBounce(e, g - f, 0, h, g) + a
    },
    easeOutBounce: function (e, f, a, h, g) {
        if ((f /= g) < (1 / 2.75)) {
            return h * (7.5625 * f * f) + a
        } else {
            if (f < (2 / 2.75)) {
                return h * (7.5625 * (f -= (1.5 / 2.75)) * f + 0.75) + a
            } else {
                if (f < (2.5 / 2.75)) {
                    return h * (7.5625 * (f -= (2.25 / 2.75)) * f + 0.9375) + a
                } else {
                    return h * (7.5625 * (f -= (2.625 / 2.75)) * f + 0.984375) + a
                }
            }
        }
    },
    easeInOutBounce: function (e, f, a, h, g) {
        if (f < g / 2) {
            return jQuery.easing.easeInBounce(e, f * 2, 0, h, g) * 0.5 + a
        }
        return jQuery.easing.easeOutBounce(e, f * 2 - g, 0, h, g) * 0.5 + h * 0.5 + a
    }
});

var center = $(window).width() / 2;
$(document).ready(function () {
    function d() {
        $(".slide.active img").each(function () {
            var g = parseInt($(this).attr("class").split(" ")[1].replace("left", ""));
            var i = g + center;
            var h = parseInt($(this).attr("class").split(" ")[3].replace("t", ""));
            var f = parseInt($(this).attr("class").split(" ")[4].replace("z", ""));
            if ($(this).hasClass("fade")) {
                $(this).css({
                    left: i,
                    top: h,
                    "z-index": f
                })
            } else {
                $(this).css({
                    left: i,
                    top: h,
                    "z-index": f
                }).show()
            }
        });
        setTimeout(function () {
            $(".slide.active img.fade,.slide.active .info").fadeIn(600, "easeInOutQuad", function () {
                $("#feature_slider").removeClass()
            })
        }, 800)
    }
    function c() {
      $("#feature_slider").addClass("disabled").append('<ul id="pagination" />');
        $("#feature_slider article").each(function () {
            $("#pagination").append('<li><a href="#' + $(this).attr("id") + '">' + $(this).index() + "</a></li>")
        });
        $("#pagination li:first").addClass("active");
        $("#pagination").css({
            left: ($(window).width() - $("#pagination li").length * 14) / 2
        });
        var h = 0;
      	var pause = false;

        function j() {
            $(".slide.active img").each(function () {
                var l = parseInt($(this).attr("class").split(" ")[1].replace("left", ""));
                var q = l + center;
                // var p = parseInt($(this).attr("class").split(" ")[2].replace("st", ""));
                var p = 400;
                var n = parseInt($(this).attr("class").split(" ")[2].replace("sp", ""));
                var o = parseInt($(this).attr("class").split(" ")[3].replace("t", ""));
                var k = parseInt($(this).attr("class").split(" ")[4].replace("z", ""));
                if ($(this).hasClass("fade")) {
                    $(this).css({
                        left: q,
                        top: o,
                        "z-index": k
                    })
                } else {
                    if ($("#feature_slider").hasClass("scrollLeft")) {
                        var m = -$(this).width() - p
                    } else {
                        var m = $(window).width() + p
                    }
                    $(this).css({
                        left: m,
                        top: o,
                        "z-index": k
                    }).show();
                    $(this).animate({
                        left: q
                    }, n, "easeOutQuad")
                }
            });
            setTimeout(function () {
                $(".slide.active img.fade,.slide.active .info").fadeIn(600, "easeInOutQuad", function () {
                    $("#feature_slider").removeClass()
                })
            }, 1100)
        }
        function g() {
            $(".slide.active").removeClass("active").addClass("previous");
            $(".slide.previous img").not(".fade").each(function () {
                // var l = parseInt($(this).attr("class").split(" ")[2].replace("st", ""));
                var l = 400;
                var k = parseInt($(this).attr("class").split(" ")[2].replace("sp", ""));
                if ($("#feature_slider").hasClass("scrollLeft")) {
                    $(this).animate({
                        left: $(window).width() + l
                    }, k, "easeInQuad")
                } else {
                    $(this).animate({
                        left: -$(this).width() - l
                    }, k, "easeInQuad")
                }
            });
            // speed of transitions
            $(".slide.previous img.fade,.slide.previous .info").fadeOut(800, "easeInQuad", function () {
                $(".slide.next").removeClass("next").addClass("active").fadeIn(700, "easeInOutQuad", function () {
                    $(".slide.previous").removeClass("previous").fadeOut(700, "easeInOutQuad");
                    j()
                })
            })
        }
        $(".slide:first").addClass("active").fadeIn(500, "easeInOutQuad", function () {
            $("#slide-left, #slide-right, #slide-pause, #pagination").fadeIn(200, "easeInOutQuad", function () {
                j()
            })
        });
        $("#pagination li").not("active").click(function () {
            clearInterval(f);
            if ($(this).index() < $("#pagination li.active").index()) {
                $("#feature_slider").addClass("scrollLeft")
            }
            if (!$("#feature_slider").hasClass("disabled")) {
                $("#feature_slider").addClass("disabled");
                $("#pagination li.active").removeClass();
                $(this).addClass("active");
                $($(this).find("a").attr("href")).addClass("next");
                g()
            }
            return false
        });
        $("#slide-left").click(function () {
            clearInterval(f);
            if (!$("#feature_slider").hasClass("disabled")) {
                $("#feature_slider").addClass("disabled");
                if ($("#pagination li:first").hasClass("active")) {
                    $("#pagination li.active").removeClass();
                    $("#pagination li:last").addClass("active");
                    $("#feature_slider article:last").addClass("next")
                } else {
                    $("#pagination li.active").removeClass().prev().addClass("active");
                    $("#feature_slider article.active").prev().addClass("next")
                }
                $("#feature_slider").addClass("scrollLeft");
                g()
            }
            return false
        });

        function i() {
            if (!$("#feature_slider").hasClass("disabled")) {
                $("#feature_slider").addClass("disabled");
                if ($("#pagination li:last").hasClass("active")) {
                    $("#pagination li.active").removeClass();
                    $("#pagination li:first").addClass("active");
                    $("#feature_slider article:first").addClass("next")
                } else {
                    $("#pagination li.active").removeClass().next().addClass("active");
                    $("#feature_slider article.active").next().addClass("next")
                }
                g()
            }
        }
        $("#slide-right").click(function () {
            clearInterval(f);
            i();
            return false;
        });
        var f = setInterval(function () {
          if(!pause) {
            i()
          }
        }, 8000);
      
      $("#slide-pause").click(function() {
        pause = !pause;
        return false;
      });
    }
    c();
    $(window).resize(function () {
        $("#pagination").css({
            left: ($(window).width() - $("#pagination li").length * 14) / 2
        });
        center = $(window).width() / 2;
        d()
    });
});/**
 * Isotope v1.5.25
 * An exquisite jQuery plugin for magical layouts
 * //isotope.metafizzy.co
 *
 * Commercial use requires one-time license fee
 * //metafizzy.co/#licenses
 *
 * Copyright 2012 David DeSandro / Metafizzy
 */
(function(a,b,c){"use strict";var d=a.document,e=a.Modernizr,f=function(a){return a.charAt(0).toUpperCase()+a.slice(1)},g="Moz Webkit O Ms".split(" "),h=function(a){var b=d.documentElement.style,c;if(typeof b[a]=="string")return a;a=f(a);for(var e=0,h=g.length;e<h;e++){c=g[e]+a;if(typeof b[c]=="string")return c}},i=h("transform"),j=h("transitionProperty"),k={csstransforms:function(){return!!i},csstransforms3d:function(){var a=!!h("perspective");if(a){var c=" -o- -moz- -ms- -webkit- -khtml- ".split(" "),d="@media ("+c.join("transform-3d),(")+"modernizr)",e=b("<style>"+d+"{#modernizr{height:3px}}"+"</style>").appendTo("head"),f=b('<div id="modernizr" />').appendTo("html");a=f.height()===3,f.remove(),e.remove()}return a},csstransitions:function(){return!!j}},l;if(e)for(l in k)e.hasOwnProperty(l)||e.addTest(l,k[l]);else{e=a.Modernizr={_version:"1.6ish: miniModernizr for Isotope"};var m=" ",n;for(l in k)n=k[l](),e[l]=n,m+=" "+(n?"":"no-")+l;b("html").addClass(m)}if(e.csstransforms){var o=e.csstransforms3d?{translate:function(a){return"translate3d("+a[0]+"px, "+a[1]+"px, 0) "},scale:function(a){return"scale3d("+a+", "+a+", 1) "}}:{translate:function(a){return"translate("+a[0]+"px, "+a[1]+"px) "},scale:function(a){return"scale("+a+") "}},p=function(a,c,d){var e=b.data(a,"isoTransform")||{},f={},g,h={},j;f[c]=d,b.extend(e,f);for(g in e)j=e[g],h[g]=o[g](j);var k=h.translate||"",l=h.scale||"",m=k+l;b.data(a,"isoTransform",e),a.style[i]=m};b.cssNumber.scale=!0,b.cssHooks.scale={set:function(a,b){p(a,"scale",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.scale?d.scale:1}},b.fx.step.scale=function(a){b.cssHooks.scale.set(a.elem,a.now+a.unit)},b.cssNumber.translate=!0,b.cssHooks.translate={set:function(a,b){p(a,"translate",b)},get:function(a,c){var d=b.data(a,"isoTransform");return d&&d.translate?d.translate:[0,0]}}}var q,r;e.csstransitions&&(q={WebkitTransitionProperty:"webkitTransitionEnd",MozTransitionProperty:"transitionend",OTransitionProperty:"oTransitionEnd otransitionend",transitionProperty:"transitionend"}[j],r=h("transitionDuration"));var s=b.event,t=b.event.handle?"handle":"dispatch",u;s.special.smartresize={setup:function(){b(this).bind("resize",s.special.smartresize.handler)},teardown:function(){b(this).unbind("resize",s.special.smartresize.handler)},handler:function(a,b){var c=this,d=arguments;a.type="smartresize",u&&clearTimeout(u),u=setTimeout(function(){s[t].apply(c,d)},b==="execAsap"?0:100)}},b.fn.smartresize=function(a){return a?this.bind("smartresize",a):this.trigger("smartresize",["execAsap"])},b.Isotope=function(a,c,d){this.element=b(c),this._create(a),this._init(d)};var v=["width","height"],w=b(a);b.Isotope.settings={resizable:!0,layoutMode:"masonry",containerClass:"isotope",itemClass:"isotope-item",hiddenClass:"isotope-hidden",hiddenStyle:{opacity:0,scale:.001},visibleStyle:{opacity:1,scale:1},containerStyle:{position:"relative",overflow:"hidden"},animationEngine:"best-available",animationOptions:{queue:!1,duration:800},sortBy:"original-order",sortAscending:!0,resizesContainer:!0,transformsEnabled:!0,itemPositionDataEnabled:!1},b.Isotope.prototype={_create:function(a){this.options=b.extend({},b.Isotope.settings,a),this.styleQueue=[],this.elemCount=0;var c=this.element[0].style;this.originalStyle={};var d=v.slice(0);for(var e in this.options.containerStyle)d.push(e);for(var f=0,g=d.length;f<g;f++)e=d[f],this.originalStyle[e]=c[e]||"";this.element.css(this.options.containerStyle),this._updateAnimationEngine(),this._updateUsingTransforms();var h={"original-order":function(a,b){return b.elemCount++,b.elemCount},random:function(){return Math.random()}};this.options.getSortData=b.extend(this.options.getSortData,h),this.reloadItems(),this.offset={left:parseInt(this.element.css("padding-left")||0,10),top:parseInt(this.element.css("padding-top")||0,10)};var i=this;setTimeout(function(){i.element.addClass(i.options.containerClass)},0),this.options.resizable&&w.bind("smartresize.isotope",function(){i.resize()}),this.element.delegate("."+this.options.hiddenClass,"click",function(){return!1})},_getAtoms:function(a){var b=this.options.itemSelector,c=b?a.filter(b).add(a.find(b)):a,d={position:"absolute"};return c=c.filter(function(a,b){return b.nodeType===1}),this.usingTransforms&&(d.left=0,d.top=0),c.css(d).addClass(this.options.itemClass),this.updateSortData(c,!0),c},_init:function(a){this.$filteredAtoms=this._filter(this.$allAtoms),this._sort(),this.reLayout(a)},option:function(a){if(b.isPlainObject(a)){this.options=b.extend(!0,this.options,a);var c;for(var d in a)c="_update"+f(d),this[c]&&this[c]()}},_updateAnimationEngine:function(){var a=this.options.animationEngine.toLowerCase().replace(/[ _\-]/g,""),b;switch(a){case"css":case"none":b=!1;break;case"jquery":b=!0;break;default:b=!e.csstransitions}this.isUsingJQueryAnimation=b,this._updateUsingTransforms()},_updateTransformsEnabled:function(){this._updateUsingTransforms()},_updateUsingTransforms:function(){var a=this.usingTransforms=this.options.transformsEnabled&&e.csstransforms&&e.csstransitions&&!this.isUsingJQueryAnimation;a||(delete this.options.hiddenStyle.scale,delete this.options.visibleStyle.scale),this.getPositionStyles=a?this._translate:this._positionAbs},_filter:function(a){var b=this.options.filter===""?"*":this.options.filter;if(!b)return a;var c=this.options.hiddenClass,d="."+c,e=a.filter(d),f=e;if(b!=="*"){f=e.filter(b);var g=a.not(d).not(b).addClass(c);this.styleQueue.push({$el:g,style:this.options.hiddenStyle})}return this.styleQueue.push({$el:f,style:this.options.visibleStyle}),f.removeClass(c),a.filter(b)},updateSortData:function(a,c){var d=this,e=this.options.getSortData,f,g;a.each(function(){f=b(this),g={};for(var a in e)!c&&a==="original-order"?g[a]=b.data(this,"isotope-sort-data")[a]:g[a]=e[a](f,d);b.data(this,"isotope-sort-data",g)})},_sort:function(){var a=this.options.sortBy,b=this._getSorter,c=this.options.sortAscending?1:-1,d=function(d,e){var f=b(d,a),g=b(e,a);return f===g&&a!=="original-order"&&(f=b(d,"original-order"),g=b(e,"original-order")),(f>g?1:f<g?-1:0)*c};this.$filteredAtoms.sort(d)},_getSorter:function(a,c){return b.data(a,"isotope-sort-data")[c]},_translate:function(a,b){return{translate:[a,b]}},_positionAbs:function(a,b){return{left:a,top:b}},_pushPosition:function(a,b,c){b=Math.round(b+this.offset.left),c=Math.round(c+this.offset.top);var d=this.getPositionStyles(b,c);this.styleQueue.push({$el:a,style:d}),this.options.itemPositionDataEnabled&&a.data("isotope-item-position",{x:b,y:c})},layout:function(a,b){var c=this.options.layoutMode;this["_"+c+"Layout"](a);if(this.options.resizesContainer){var d=this["_"+c+"GetContainerSize"]();this.styleQueue.push({$el:this.element,style:d})}this._processStyleQueue(a,b),this.isLaidOut=!0},_processStyleQueue:function(a,c){var d=this.isLaidOut?this.isUsingJQueryAnimation?"animate":"css":"css",f=this.options.animationOptions,g=this.options.onLayout,h,i,j,k;i=function(a,b){b.$el[d](b.style,f)};if(this._isInserting&&this.isUsingJQueryAnimation)i=function(a,b){h=b.$el.hasClass("no-transition")?"css":d,b.$el[h](b.style,f)};else if(c||g||f.complete){var l=!1,m=[c,g,f.complete],n=this;j=!0,k=function(){if(l)return;var b;for(var c=0,d=m.length;c<d;c++)b=m[c],typeof b=="function"&&b.call(n.element,a,n);l=!0};if(this.isUsingJQueryAnimation&&d==="animate")f.complete=k,j=!1;else if(e.csstransitions){var o=0,p=this.styleQueue[0],s=p&&p.$el,t;while(!s||!s.length){t=this.styleQueue[o++];if(!t)return;s=t.$el}var u=parseFloat(getComputedStyle(s[0])[r]);u>0&&(i=function(a,b){b.$el[d](b.style,f).one(q,k)},j=!1)}}b.each(this.styleQueue,i),j&&k(),this.styleQueue=[]},resize:function(){this["_"+this.options.layoutMode+"ResizeChanged"]()&&this.reLayout()},reLayout:function(a){this["_"+this.options.layoutMode+"Reset"](),this.layout(this.$filteredAtoms,a)},addItems:function(a,b){var c=this._getAtoms(a);this.$allAtoms=this.$allAtoms.add(c),b&&b(c)},insert:function(a,b){this.element.append(a);var c=this;this.addItems(a,function(a){var d=c._filter(a);c._addHideAppended(d),c._sort(),c.reLayout(),c._revealAppended(d,b)})},appended:function(a,b){var c=this;this.addItems(a,function(a){c._addHideAppended(a),c.layout(a),c._revealAppended(a,b)})},_addHideAppended:function(a){this.$filteredAtoms=this.$filteredAtoms.add(a),a.addClass("no-transition"),this._isInserting=!0,this.styleQueue.push({$el:a,style:this.options.hiddenStyle})},_revealAppended:function(a,b){var c=this;setTimeout(function(){a.removeClass("no-transition"),c.styleQueue.push({$el:a,style:c.options.visibleStyle}),c._isInserting=!1,c._processStyleQueue(a,b)},10)},reloadItems:function(){this.$allAtoms=this._getAtoms(this.element.children())},remove:function(a,b){this.$allAtoms=this.$allAtoms.not(a),this.$filteredAtoms=this.$filteredAtoms.not(a);var c=this,d=function(){a.remove(),b&&b.call(c.element)};a.filter(":not(."+this.options.hiddenClass+")").length?(this.styleQueue.push({$el:a,style:this.options.hiddenStyle}),this._sort(),this.reLayout(d)):d()},shuffle:function(a){this.updateSortData(this.$allAtoms),this.options.sortBy="random",this._sort(),this.reLayout(a)},destroy:function(){var a=this.usingTransforms,b=this.options;this.$allAtoms.removeClass(b.hiddenClass+" "+b.itemClass).each(function(){var b=this.style;b.position="",b.top="",b.left="",b.opacity="",a&&(b[i]="")});var c=this.element[0].style;for(var d in this.originalStyle)c[d]=this.originalStyle[d];this.element.unbind(".isotope").undelegate("."+b.hiddenClass,"click").removeClass(b.containerClass).removeData("isotope"),w.unbind(".isotope")},_getSegments:function(a){var b=this.options.layoutMode,c=a?"rowHeight":"columnWidth",d=a?"height":"width",e=a?"rows":"cols",g=this.element[d](),h,i=this.options[b]&&this.options[b][c]||this.$filteredAtoms["outer"+f(d)](!0)||g;h=Math.floor(g/i),h=Math.max(h,1),this[b][e]=h,this[b][c]=i},_checkIfSegmentsChanged:function(a){var b=this.options.layoutMode,c=a?"rows":"cols",d=this[b][c];return this._getSegments(a),this[b][c]!==d},_masonryReset:function(){this.masonry={},this._getSegments();var a=this.masonry.cols;this.masonry.colYs=[];while(a--)this.masonry.colYs.push(0)},_masonryLayout:function(a){var c=this,d=c.masonry;a.each(function(){var a=b(this),e=Math.ceil(a.outerWidth(!0)/d.columnWidth);e=Math.min(e,d.cols);if(e===1)c._masonryPlaceBrick(a,d.colYs);else{var f=d.cols+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.colYs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryPlaceBrick(a,g)}})},_masonryPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=this.masonry.columnWidth*d,h=c;this._pushPosition(a,g,h);var i=c+a.outerHeight(!0),j=this.masonry.cols+1-f;for(e=0;e<j;e++)this.masonry.colYs[d+e]=i},_masonryGetContainerSize:function(){var a=Math.max.apply(Math,this.masonry.colYs);return{height:a}},_masonryResizeChanged:function(){return this._checkIfSegmentsChanged()},_fitRowsReset:function(){this.fitRows={x:0,y:0,height:0}},_fitRowsLayout:function(a){var c=this,d=this.element.width(),e=this.fitRows;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.x!==0&&f+e.x>d&&(e.x=0,e.y=e.height),c._pushPosition(a,e.x,e.y),e.height=Math.max(e.y+g,e.height),e.x+=f})},_fitRowsGetContainerSize:function(){return{height:this.fitRows.height}},_fitRowsResizeChanged:function(){return!0},_cellsByRowReset:function(){this.cellsByRow={index:0},this._getSegments(),this._getSegments(!0)},_cellsByRowLayout:function(a){var c=this,d=this.cellsByRow;a.each(function(){var a=b(this),e=d.index%d.cols,f=Math.floor(d.index/d.cols),g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByRowGetContainerSize:function(){return{height:Math.ceil(this.$filteredAtoms.length/this.cellsByRow.cols)*this.cellsByRow.rowHeight+this.offset.top}},_cellsByRowResizeChanged:function(){return this._checkIfSegmentsChanged()},_straightDownReset:function(){this.straightDown={y:0}},_straightDownLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,0,c.straightDown.y),c.straightDown.y+=d.outerHeight(!0)})},_straightDownGetContainerSize:function(){return{height:this.straightDown.y}},_straightDownResizeChanged:function(){return!0},_masonryHorizontalReset:function(){this.masonryHorizontal={},this._getSegments(!0);var a=this.masonryHorizontal.rows;this.masonryHorizontal.rowXs=[];while(a--)this.masonryHorizontal.rowXs.push(0)},_masonryHorizontalLayout:function(a){var c=this,d=c.masonryHorizontal;a.each(function(){var a=b(this),e=Math.ceil(a.outerHeight(!0)/d.rowHeight);e=Math.min(e,d.rows);if(e===1)c._masonryHorizontalPlaceBrick(a,d.rowXs);else{var f=d.rows+1-e,g=[],h,i;for(i=0;i<f;i++)h=d.rowXs.slice(i,i+e),g[i]=Math.max.apply(Math,h);c._masonryHorizontalPlaceBrick(a,g)}})},_masonryHorizontalPlaceBrick:function(a,b){var c=Math.min.apply(Math,b),d=0;for(var e=0,f=b.length;e<f;e++)if(b[e]===c){d=e;break}var g=c,h=this.masonryHorizontal.rowHeight*d;this._pushPosition(a,g,h);var i=c+a.outerWidth(!0),j=this.masonryHorizontal.rows+1-f;for(e=0;e<j;e++)this.masonryHorizontal.rowXs[d+e]=i},_masonryHorizontalGetContainerSize:function(){var a=Math.max.apply(Math,this.masonryHorizontal.rowXs);return{width:a}},_masonryHorizontalResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_fitColumnsReset:function(){this.fitColumns={x:0,y:0,width:0}},_fitColumnsLayout:function(a){var c=this,d=this.element.height(),e=this.fitColumns;a.each(function(){var a=b(this),f=a.outerWidth(!0),g=a.outerHeight(!0);e.y!==0&&g+e.y>d&&(e.x=e.width,e.y=0),c._pushPosition(a,e.x,e.y),e.width=Math.max(e.x+f,e.width),e.y+=g})},_fitColumnsGetContainerSize:function(){return{width:this.fitColumns.width}},_fitColumnsResizeChanged:function(){return!0},_cellsByColumnReset:function(){this.cellsByColumn={index:0},this._getSegments(),this._getSegments(!0)},_cellsByColumnLayout:function(a){var c=this,d=this.cellsByColumn;a.each(function(){var a=b(this),e=Math.floor(d.index/d.rows),f=d.index%d.rows,g=(e+.5)*d.columnWidth-a.outerWidth(!0)/2,h=(f+.5)*d.rowHeight-a.outerHeight(!0)/2;c._pushPosition(a,g,h),d.index++})},_cellsByColumnGetContainerSize:function(){return{width:Math.ceil(this.$filteredAtoms.length/this.cellsByColumn.rows)*this.cellsByColumn.columnWidth}},_cellsByColumnResizeChanged:function(){return this._checkIfSegmentsChanged(!0)},_straightAcrossReset:function(){this.straightAcross={x:0}},_straightAcrossLayout:function(a){var c=this;a.each(function(a){var d=b(this);c._pushPosition(d,c.straightAcross.x,0),c.straightAcross.x+=d.outerWidth(!0)})},_straightAcrossGetContainerSize:function(){return{width:this.straightAcross.x}},_straightAcrossResizeChanged:function(){return!0}},b.fn.imagesLoaded=function(a){function h(){a.call(c,d)}function i(a){var c=a.target;c.src!==f&&b.inArray(c,g)===-1&&(g.push(c),--e<=0&&(setTimeout(h),d.unbind(".imagesLoaded",i)))}var c=this,d=c.find("img").add(c.filter("img")),e=d.length,f="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",g=[];return e||h(),d.bind("load.imagesLoaded error.imagesLoaded",i).each(function(){var a=this.src;this.src=f,this.src=a}),c};var x=function(b){a.console&&a.console.error(b)};b.fn.isotope=function(a,c){if(typeof a=="string"){var d=Array.prototype.slice.call(arguments,1);this.each(function(){var c=b.data(this,"isotope");if(!c){x("cannot call methods on isotope prior to initialization; attempted to call method '"+a+"'");return}if(!b.isFunction(c[a])||a.charAt(0)==="_"){x("no such method '"+a+"' for isotope instance");return}c[a].apply(c,d)})}else this.each(function(){var d=b.data(this,"isotope");d?(d.option(a),d._init(c)):b.data(this,"isotope",new b.Isotope(a,this,c))});return this}})(window,jQuery);$(function() {
	$("#landing .sh-form").prepend("<h3>Contact Us to Get Your Free Website</h3>");
  
  $(".fancyboxiframe").fancybox({
		maxWidth	: 800,
		maxHeight	: 600,
		fitToView	: false,
		width		: '70%',
		height		: '70%',
		autoSize	: false,
		closeClick	: false,
		openEffect	: 'none',
		closeEffect	: 'none'
	});
});$(function() {
  $('a[href*=#]:not([href=#])').click(function() {
    if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
      var target = $(this.hash);
      target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
      if (target.length) {
        $('html,body').animate({
          scrollTop: target.offset().top
        }, 1000);
        return false;
      }
    }
  });
});var url = window.location.href;
var Connor = Connor || {};

Connor.DealerSearch = (function ($) {
  var my = {};
  
  my.SubmittedForm = null;
  
  my.ResultTemplate = "{{#Items}}<div class='dealer-details'><h4>{{Application}}</h4><address><h4 class='name' style='font-style: italic;'>{{Company}}</h4><span class='phone'>{{Phone}}</span><br /><span class='web'><a href='//{{Web}}'>{{Web}}</a></span></address>{{/Items}}";
  
  my.IntlTemplate = "<div class='dealer-details'><h4>{{{name}}}</h4><address>{{{contact}}}<br /><a href='mailto:{{email}}'>{{email}}</a><br />{{phone}}</address>{{#reps}}<address><h4>{{{name}}}</h4>{{#contact}}{{contact}}<br />{{/contact}}<a href='mailto:{{email}}'>{{email}}</a><br />{{phone}}</address>{{/reps}}</div>";
  
  my.canadaTemplate = "<div class='dealer-details'>{{#reps}}<address><h4>{{{name}}}</h4>{{#contact}}{{contact}}<br />{{/contact}}<a href='mailto:{{email}}'>{{email}}</a><br />{{phone}}</address>{{/reps}}</div>";
  
  my.SearchByZipBoth = function(zipcode, success) {
  	var res = "Residential";
    var com = "Institutional";
    var results = [];
    
    $.getJSON("//contact.sportcourt.com/api/contact/" + zipcode, null, function(data) {
      for(var i = 0; i < data[0].Dealer.length; i++) {
        data[0].Dealer[i].Application = data[0].Dealer[i].Application.trim();
        data[0].Dealer[i].Company = data[0].Dealer[i].Company.trim();
        data[0].Dealer[i].Phone = data[0].Dealer[i].Phone.trim();
        data[0].Dealer[i].Web = data[0].Dealer[i].Web.trim();
      	results.push(data[0].Dealer[i]);
      }
      success(results);
    });    
  };
  
  my.getUrlVars = function() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,    
    function(m,key,value) {
      vars[key] = value;
    });
    return vars;
  };
  
  my.Initialize = function() {
    $(".dealer-search").submit(my.SearchForm);
    $(".lead-button").click(my.SearchFormLead);
    
    my.LoadIntl("#shIntlDealers");
    $("#shIntlDealers").change(my.SelectIntlDealer);    
  };
  
  my.SearchForm = function(e) {
    $(".dealer-details").remove();
    my.SubmittedForm = $(this);
    var zipcode = $(this).find(".zipcode").val();
    
    my.SearchByZipBoth(zipcode, function(results) {
      var output = Mustache.render(my.ResultTemplate, { Items: results });
      my.SubmittedForm.after(output);
	  my.SearchCanadaByZip(zipcode);
    });

    
    e.preventDefault();
    return false;
  };
  
  my.SearchFormLead = function(e) {
    var url = "//contactus.sportcourt.com/frmCourtbuilderLead.aspx";
    var form = $(this).closest(".sh-form");
    
    if(SquareHook.FormSubmission.validateFormFields(form)) {
      var data = {
        Name: form.find("#TextId1").val(),
        Address: form.find("#TextId2").val(),
        City: form.find("#TextId3").val(),
        State: form.find(".state").val(),
        Zip: form.find("#TextId5").val(),
        Country: form.find(".country").val(),
        Email: form.find("#TextId8").val(),
        Phone: form.find("#TextId7").val(),
        Comments: form.find("#MessageId13").val(),
        HowHeard: form.find(".how-heard").val(),
        Application: my.GetRadioValue(form, "Application"),
        Location: my.GetRadioValue(form, "Location"),
        Products: my.GetCheckValue(form, "Which products are you interested in?"),
        cWeb: location.href
      };
      
      $.get(url, data, function(results) {
        console.log(results);
      });
      
      my.SubmittedForm = $(".dealer-search");
      $(".dealer-details").remove();
      
      my.SearchByZipBoth(data.Zip, function(results) {
        var output = Mustache.render(my.ResultTemplate, { Items: results });
      	my.SubmittedForm.after(output); 
    	my.SearchCanadaByZip(zipcode);     	
      });
    }
    
  };
  
  my.GetRadioValue = function(form, name) {
    var field = form.find("input[type='radio'][name='" + name + "']:checked");
    if(field.length > 0) {
    	return field.val();
    }
    return "";
  };
  
  my.GetCheckValue = function(form, name) {
    var fields = form.find("input[type='checkbox'][name='" + name + "']:checked");
    var result = "";
    fields.each(function(index) {
    	result = result + $(this).val() + ",";
    });
    return result;
  };

  my.SelectIntlDealer = function(e) {
  	var id = $(this).val();
    var dealer = null;
    
    for(var i = 0; i < my.InternationalAddress.length; i++) {
      if(my.InternationalAddress[i].abbreviation == id) {
      	dealer = my.InternationalAddress[i];
        break;
      }
    }
    
    if(dealer != null) {
      var output = Mustache.render(my.IntlTemplate, dealer);
      $("#intlDealerDetails").html(output);
    }
    console.log(dealer);
  };

  my.SearchCanadaByZip = function(zipcode) {
  	zipcode = zipcode.trim().substring(0,1).toLowerCase();
    var found = false;
    var output = "";
  	for(var i = 0; i < my.InternationalAddress.length; i++) {
  		if(my.InternationalAddress[i].abbreviation == "CA") {
  			var canada = my.InternationalAddress[i];
  			if(canada.postal != null && canada.postal.toLowerCase().indexOf(zipcode) >= 0) {
		    	output += Mustache.render(my.canadaTemplate, canada);
            	found = true;
  			}
  		}
  	}
    
    // clear
    if(found) {
      	$(".dealer-details").remove();
    	my.SubmittedForm.after(output);  	
    }
  };
  
  my.LoadIntl = function(name) {
    var output = Mustache.render("<option value=''>Find a Sport Court Expert</option>{{#data}}<option value='{{abbreviation}}'>{{name}}</option>{{/data}}", { data: my.InternationalAddress });
    $(name).html(output);
  };
  
  my.InternationalReps = [
  	'John Massman<br />International Sales Manager<br />E-mail: <a href="mailto:jmassman@sportcourt.com">jmassman@sportcourt.com</a><br />Office: +1-801-972-0260',
    'Valerie Salvato<br />International Business Coordinator<br />E-mail: <a href="mailto:vsalvato@connorfloor.com">vsalvato@connorfloor.com</a><br />Office: +1-801-924-3717<br />Cell: +1-847-345-4194'
  ];

  my.InternationalAddress = [
	{ 
		name: "Afghanistan",
		abbreviation: "AF",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Aland Islands",
		abbreviation: "AX",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Albania",
		abbreviation: "AL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Algeria",
		abbreviation: "DZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "American Samoa",
		abbreviation: "AS",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Angola",
		abbreviation: "AO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Anguilla",
		abbreviation: "AI",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Antarctica",
		abbreviation: "AQ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Antigua And Barbuda",
		abbreviation: "AG",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Argentina",
		abbreviation: "AR",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Armenia",
		abbreviation: "AM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Aruba",
		abbreviation: "AW",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Australia",
		abbreviation: "AU",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360", 
		reps: [
			{
				name: "RMA Sport and Leisure Pty. Ltd",
				contact: "Roger Macann",
				phone: "+61.2 9484 1120",
				email: "roger@rmasport.com.au"
			}
		]
	},
	{ 
		name: "Austria",
		abbreviation: "AT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Azerbaijan",
		abbreviation: "AZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Bahamas",
		abbreviation: "BS",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Bahrain",
		abbreviation: "BH",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Bangladesh",
		abbreviation: "BD",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Barbados",
		abbreviation: "BB",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Belarus",
		abbreviation: "BY",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Belgium",
		abbreviation: "BE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Belize",
		abbreviation: "BZ",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Benin",
		abbreviation: "BJ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Bermuda",
		abbreviation: "BM",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Bhutan",
		abbreviation: "BT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Bolivia",
		abbreviation: "BO",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Bosnia And Herzegovina",
		abbreviation: "BA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Botswana",
		abbreviation: "BW",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Brazil",
		abbreviation: "BR",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "British Indian Ocean Territory",
		abbreviation: "IO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Brunei Darussalam",
		abbreviation: "BN",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Bulgaria",
		abbreviation: "BG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Burkina Faso",
		abbreviation: "BF",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Burundi",
		abbreviation: "BI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Cambodia",
		abbreviation: "KH",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Cameroon",
		abbreviation: "CM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Canada",
		abbreviation: "CA",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Alberta",
		abbreviation: "CA",
		postal: "T",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Sport Court of Calgary",
				contact: "Brent Marinos",
				phone: "+1 - 403-287-0466",
				email: "sportcourt@telusplanet.net"
			}
		]
	},
	{ 
		name: "British Columbia",
		abbreviation: "CA",
		postal: "V",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "BC Sport Court Ltd. Vancouver, BC",
				contact: "",
				phone: "+1 604-390-1010",
				email: "info@bcsportcourt.com"
			},
			{
				name: "Commercial: Cascadia Sports Systems; Port Moody, BC",
				contact: "",
				phone: "+1 604-461-5208",
				email: "murdop@cascadiasport.com"
			}
		]
	},
	{ 
		name: "Manitoba",
		abbreviation: "CA",
		postal: "R",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Athletic Flooring Systems",
				contact: "",
				phone: "+1 204-895-4422",
				email: "gweinberg5@shaw.ca"
			}
		]
	},
	{ 
		name: "Maritime Provinces",
		abbreviation: "CA",
		postal: "G,A,E,C,B",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Ralph Connor Company; Halifax, Nova Scotia",
				contact: "+1 902-455-8303",
				phone: "",
				email: "mike.sperdakes@rccl-flooring.com"
			}
		]
	},
	{ 
		name: "Ontario",
		abbreviation: "CA",
		postal: "P,L,M,N",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Residential: Sport Court Ontario",
				contact: "",
				phone: "+1 705-330-1798",
				email: "sportcourt@rogers.com"
			}
		]
	},
	{ 
		name: "Quebec",
		abbreviation: "CA",
		postal: "J,K,H",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Elite Distribution De Courve-Planchers; Quebec City",
				contact: "",
				phone: "+1 418-687-0545",
				email: "guygilbert@sport.qc.ca"
			}
		]
	},
	{ 
		name: "Cape Verde",
		abbreviation: "CV",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Cayman Islands",
		abbreviation: "KY",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Central African Republic",
		abbreviation: "CF",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Chad",
		abbreviation: "TD",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Chile",
		abbreviation: "CL",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Moeckel and Weil Ltd; Vitacura, Santiago",
				contact: "Juan Carlos Moeckel",
				phone: "+56 2201-9060",
				email: "jcmoeckel@mckl.cl"
			}
		]
	},
	{ 
		name: "China",
		abbreviation: "CN",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Colombia",
		abbreviation: "CO",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "PanamericanSport",
				contact: "Judith Rodriguez",
				phone: "+57 310 796 6793",
				email: "jr@panamericansport.com"
			}
		]
	},
	{ 
		name: "Comoros",
		abbreviation: "KM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Congo",
		abbreviation: "CG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Congo, The Democratic Republic Of The",
		abbreviation: "CD",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Cook Islands",
		abbreviation: "CK",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Costa Rica",
		abbreviation: "CR",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Canchas De Deportivas",
				contact: "",
				phone: "(503) 2298-2365",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Cote D'Ivoire",
		abbreviation: "CI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Croatia",
		abbreviation: "HR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Cuba",
		abbreviation: "CU",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Cyprus",
		abbreviation: "CY",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Czech Republic",
		abbreviation: "CZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Denmark",
		abbreviation: "DK",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Djibouti",
		abbreviation: "DJ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Dominica",
		abbreviation: "DM",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Dominican Republic",
		abbreviation: "DO",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Ecuador",
		abbreviation: "EC",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Egypt",
		abbreviation: "EG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "El Salvador",
		abbreviation: "SV",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Canchas Deportivas de CentroamŽrica;  Calle Nueva, N¡1, #3811, Col. Escal—n, San Salvador, El Salvador",
				contact: "",
				phone: "(503) 2298-2365",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Equatorial Guinea",
		abbreviation: "GQ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Estonia",
		abbreviation: "EE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Ethiopia",
		abbreviation: "ET",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Falkland Islands (Malvinas)",
		abbreviation: "FK",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Fiji",
		abbreviation: "FJ",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Finland",
		abbreviation: "FI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "France",
		abbreviation: "FR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "French Guiana",
		abbreviation: "GF",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "French Polynesia",
		abbreviation: "PF",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Gabon",
		abbreviation: "GA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Gambia",
		abbreviation: "GM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Georgia",
		abbreviation: "GE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Germany",
		abbreviation: "DE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Ghana",
		abbreviation: "GH",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Gibraltar",
		abbreviation: "GI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Greece",
		abbreviation: "GR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Greenland",
		abbreviation: "GL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Grenada",
		abbreviation: "GD",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Guadeloupe",
		abbreviation: "GP",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Guam",
		abbreviation: "GU",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Guatemala",
		abbreviation: "GT",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Canchas Deportivas de Guatemala S.A.; Edificio Rodseguros, 7o nivel, oficina # 702, via I, I-67, Zona 4. Guatemala",
				contact: "",
				phone: "(502) 2362-0158 - 59",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Guinea",
		abbreviation: "GN",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Guyana",
		abbreviation: "GY",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Haiti",
		abbreviation: "HT",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Honduras",
		abbreviation: "HN",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Conchas Deportivas; Comayaguela, Honduras.",
				contact: "",
				phone: "(504)2234-3752",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Hong Kong",
		abbreviation: "HK",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Hungary",
		abbreviation: "HU",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Iceland",
		abbreviation: "IS",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "India",
		abbreviation: "IN",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Indonesia",
		abbreviation: "ID",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Iran, Islamic Republic Of",
		abbreviation: "IR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Iraq",
		abbreviation: "IQ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Ireland",
		abbreviation: "IE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Israel",
		abbreviation: "IL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Italy",
		abbreviation: "IT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Jamaica",
		abbreviation: "JM",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Japan",
		abbreviation: "JP",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Jordan",
		abbreviation: "JO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Kazakhstan",
		abbreviation: "KZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Kenya",
		abbreviation: "KE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "South Korea",
		abbreviation: "KP",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Kuwait",
		abbreviation: "KW",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Kyrgyzstan",
		abbreviation: "KG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Laos",
		abbreviation: "LA",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Latvia",
		abbreviation: "LV",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Lebanon",
		abbreviation: "LB",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Liberia",
		abbreviation: "LR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Libia",
		abbreviation: "LY",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Liechtenstein",
		abbreviation: "LI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Lithuania",
		abbreviation: "LT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Luxembourg",
		abbreviation: "LU",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Macao",
		abbreviation: "MO",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Macedonia, The Former Yugoslav Republic Of",
		abbreviation: "MK",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Madagascar",
		abbreviation: "MG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Malawi",
		abbreviation: "MW",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Malaysia",
		abbreviation: "MY",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Maldives",
		abbreviation: "MV",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Mali",
		abbreviation: "ML",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Malta",
		abbreviation: "MT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Marshall Islands",
		abbreviation: "MH",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Martinique",
		abbreviation: "MQ",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Mauritania",
		abbreviation: "MR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Mexico",
		abbreviation: "MX",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "LJV Sport; Monterrey, Nuevo Leon 64800",
				contact: "Luis del Valle",
				phone: "+52 818 387 5858",
				email: "luisdelvalle@ljvsport.com"
			}
		]
	},
	{ 
		name: "Micronesia",
		abbreviation: "FM",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Moldova",
		abbreviation: "MD",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Monaco",
		abbreviation: "MC",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Mongolia",
		abbreviation: "MN",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Montserrat",
		abbreviation: "MS",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Morocco",
		abbreviation: "MA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Mozambique",
		abbreviation: "MZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Myanmar",
		abbreviation: "MM",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Namibia",
		abbreviation: "NA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Nepal",
		abbreviation: "NP",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Netherlands",
		abbreviation: "NL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Netherlands Antilles",
		abbreviation: "AN",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "New Caledonia",
		abbreviation: "NC",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "New Zealand",
		abbreviation: "NZ",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Nicaragua",
		abbreviation: "NI",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Canchas Deportivas; Parque El Carmen - Managua, Nicaragua",
				contact: "",
				phone: "(505) 8882-0301",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Niger",
		abbreviation: "NE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Nigeria",
		abbreviation: "NG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Northern Mariana Islands",
		abbreviation: "MP",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Norway",
		abbreviation: "NO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Oman",
		abbreviation: "OM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Pakistan",
		abbreviation: "PK",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Palau",
		abbreviation: "PW",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Palestinian Territory, Occupied",
		abbreviation: "PS",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Panama",
		abbreviation: "PA",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Canchas Deportivas",
				contact: "",
				phone: "(503) 2298-2365",
				email: "info@canchas-deportivas.com"
			}
		]
	},
	{ 
		name: "Papua New Guinea",
		abbreviation: "PG",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Paraguay",
		abbreviation: "PY",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Peru",
		abbreviation: "PE",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258", 
		reps: [
			{
				name: "Sport Tek Peru Miraflores, Lima Ð Peru",
				contact: "Oscar Vega",
				phone: "011 -511-4457378",
				email: "direccion@sportekperu.com"
			}
		]
	},
	{ 
		name: "Philippines",
		abbreviation: "PH",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Poland",
		abbreviation: "PL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Portugal",
		abbreviation: "PT",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Puerto Rico",
		abbreviation: "PR",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Qatar",
		abbreviation: "QA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Romania",
		abbreviation: "RO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Russian Federation",
		abbreviation: "RU",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Rwanda",
		abbreviation: "RW",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Saint Kitts And Nevis",
		abbreviation: "KN",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Saint Lucia",
		abbreviation: "LC",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Saint Vincent And The Grenadines",
		abbreviation: "VC",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Samoa",
		abbreviation: "WS",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Sao Tome And Principe",
		abbreviation: "ST",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Saudi Arabia",
		abbreviation: "SA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Senegal",
		abbreviation: "SN",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Serbia And Montenegro",
		abbreviation: "CS",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Seychelles",
		abbreviation: "SC",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Sierra Leone",
		abbreviation: "SL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Singapore",
		abbreviation: "SG",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Slovakia",
		abbreviation: "SK",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Slovenia",
		abbreviation: "SI",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Solomon Islands",
		abbreviation: "SB",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Somalia",
		abbreviation: "SO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "South Africa",
		abbreviation: "ZA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "South Georgia And The South Sandwich Islands",
		abbreviation: "GS",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Spain",
		abbreviation: "ES",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Sri Lanka",
		abbreviation: "LK",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Sudan",
		abbreviation: "SD",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Suriname",
		abbreviation: "SR",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Swaziland",
		abbreviation: "SZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Sweden",
		abbreviation: "SE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Switzerland",
		abbreviation: "CH",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Syrian Arab Republic",
		abbreviation: "SY",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Taiwan, Province Of China",
		abbreviation: "TW",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Tajikistan",
		abbreviation: "TJ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Tanzania, United Republic Of",
		abbreviation: "TZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Thailand",
		abbreviation: "TH",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Timor-Leste",
		abbreviation: "TL",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Togo",
		abbreviation: "TG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Tokelau",
		abbreviation: "TK",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Tonga",
		abbreviation: "TO",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Trinidad And Tobago",
		abbreviation: "TT",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Tunisia",
		abbreviation: "TN",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Turkey",
		abbreviation: "TR",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Turkmenistan",
		abbreviation: "TM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Turks And Caicos Islands",
		abbreviation: "TC",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Uganda",
		abbreviation: "UG",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Ukraine",
		abbreviation: "UA",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "United Arab Emirates",
		abbreviation: "AE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "United Kingdom",
		abbreviation: "GB",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Uruguay",
		abbreviation: "UY",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Uzbekistan",
		abbreviation: "UZ",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Vanuatu",
		abbreviation: "VU",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Venezuela",
		abbreviation: "VE",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Viet Nam",
		abbreviation: "VN",
		contact: "Bary King",
		email: "bking@sportcourt.com",
		phone: "+886-939154360"
	},
	{ 
		name: "Virgin Islands, British",
		abbreviation: "VG",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Virgin Islands, U.S.",
		abbreviation: "VI",
		contact: "John Massman",
		email: "jmassman@sportcourt.com",
		phone: "+1 801-978-6258"
	},
	{ 
		name: "Western Sahara",
		abbreviation: "EH",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Yemen",
		abbreviation: "YE",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Zambia",
		abbreviation: "ZM",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	},
	{ 
		name: "Zimbabwe",
		abbreviation: "ZW",
		contact: "Ryan Burke",
		email: "rburke@sportcourt.com",
		phone: "+1 801-978-6232"
	}
	];

    
  return my;
} (jQuery));

$(function() { Connor.DealerSearch.Initialize(); });


/**
 * jQuery.ajax mid - CROSS DOMAIN AJAX 
 * ---
 * @author James Padolsey (//james.padolsey.com)
 * @version 0.11
 * @updated 12-JAN-10
 * ---
 * Note: Read the README!
 * ---
 * @info //james.padolsey.com/javascript/cross-domain-requests-with-jquery/
 */

jQuery.ajax = (function(_ajax){
    
    var protocol = location.protocol,
        hostname = location.hostname,
        exRegex = RegExp(protocol + '//' + hostname),
        YQL = 'http' + (/^https/.test(protocol)?'s':'') + '://query.yahooapis.com/v1/public/yql?callback=?',
        query = 'select * from html where url="{URL}" and xpath="*"';
    
    function isExternal(url) {
        return !exRegex.test(url) && /:\/\//.test(url);
    }
    
    return function(o) {
        
        var url = o.url;
        
        if ( /get/i.test(o.type) && !/json/i.test(o.dataType) && isExternal(url) ) {
            
            // Manipulate options so that JSONP-x request is made to YQL
            
            o.url = YQL;
            o.dataType = 'json';
            
            o.data = {
                q: query.replace(
                    '{URL}',
                    url + (o.data ?
                        (/\?/.test(url) ? '&' : '?') + jQuery.param(o.data)
                    : '')
                ),
                format: 'xml'
            };
            
            // Since it's a JSONP request
            // complete === success
            if (!o.success && o.complete) {
                o.success = o.complete;
                delete o.complete;
            }
            
            o.success = (function(_success){
                return function(data) {
                    
                    if (_success) {
                        // Fake XHR callback.
                        _success.call(this, {
                            responseText: (data.results[0] || '')
                                // YQL screws with <script>s
                                // Get rid of them
                                .replace(/<script[^>]+?\/>|<script(.|\s)*?\/script>/gi, '')
                        }, 'success');
                    }
                    
                };
            })(o.success);
            
        }
        
        return _ajax.apply(this, arguments);
        
    };
    
})(jQuery.ajax);$(".family-gallery3 img").each(
  function(){
    $(this).css("height", "");
    $(this).css("width", "");
  
});