jQuery( document ).ready( function() {

	function kirkiCompareValues( value1, value2, operator, extras ) {
		switch ( operator ) {
			case '===':
				return value1 === value2;
			case '==':
			case '=':
			case 'equals':
			case 'equal':
				return value1 == value2; // jshint ignore:line
			case '!==':
				return value1 !== value2;
			case '!=':
			case 'not equal':
				return value1 != value2; // jshint ignore:line
			case '>=':
			case 'greater or equal':
			case 'equal or greater':
				return value1 >= value2;
			case '<=':
			case 'smaller or equal':
			case 'equal or smaller':
				return value1 <= value2;
			case '>':
			case 'greater':
				return value1 > value2;
			case '<':
			case 'smaller':
				return value1 < value2;
			case 'contains':
			case 'in':
				if ( 'object' === typeof value2 ) {
					if ( 'undefined' !== typeof value2[ value1 ] ) {
						return true;
					}
					window.kirkiControlDependencies[ extras[0] ][ extras[1] ] = false;
					_.each( value2, function( subValue ) {
						if ( value1 === subValue ) {
							window.kirkiControlDependencies[ extras[0] ][ extras[1] ] = true;
						}
					});
					return window.kirkiControlDependencies[ extras[0] ][ extras[1] ];
				} else if ( 'string' === typeof value2 ) {
					return value2.indexOf( value1 );
				}
				break;
			default:
				return true;

		}
	}

	_.each( fieldDependencies, function( args, slaveControlID ) {

		// An array of all master controls for this slave.
		var kirkiControlDependenciesMasterControls = [],

		    slaveControl = wp.customize.control( slaveControlID ),
			showControl  = {};

		// Populate the kirkiControlDependenciesMasterControls array.
		_.each( args, function( dependency ) {
			if ( 'object' === typeof dependency ) {
				_.each( dependency, function( subDependency ) {
					if ( 'undefined' !== subDependency.setting ) {
						kirkiControlDependenciesMasterControls.push( subDependency.setting );
					}
				});
			}
			kirkiControlDependenciesMasterControls.push( dependency.setting );
		});

		_.each( kirkiControlDependenciesMasterControls, function( masterControlID ) {

			wp.customize( masterControlID, function( masterSetting ) {

				// Listen for changes to the master control values.
				masterSetting.bind( function() {
					var show = true;
					_.each( args, function( dependency, index ) {
						if ( 'undefined' !== typeof dependency[0] && 'undefined' !== typeof dependency[0].setting ) {
							// var orConditionShow = {},
							//     orConditionID   = '';
							//
							// _.each( dependency, function( subDependency, subIndex ) {
							// 	orConditionShow[ masterControlID ] = kirkiCompareValues(
							// 		subDependency.value,
							// 		masterSetting.get(),
							// 		subDependency.operator,
							// 		[slaveControlID, subDependency.setting]
							// 	);
							// });
							// _.each( dependency, function( subDependency ) {
							// 	orConditionID += subDependency.setting;
							// });
							//
							// _.each( orConditionShow, function( val ) {
							// 	console.log( val );
							// 	if ( true === val ) {
							// 		showControl[ orConditionID ] = true;
							// 	}
							// });
						} else {
							showControl[ masterControlID ] = kirkiCompareValues(
								dependency.value,
								masterSetting.get(),
								dependency.operator,
								[slaveControlID, dependency.setting]
							);
						}
					});
					_.each( showControl, function( val ) {
						if ( false === val ) {
							show = false;
						}
					});
					if ( false === show ) {
						wp.customize.control( slaveControlID ).deactivate();
					} else {
						wp.customize.control( slaveControlID ).activate();
					}
				});
			});
		});
	});
});

@@ -774,35 +774,27 @@
 %09%09%09if ( 
-'object' === typeof
+_.isObject(
  value2 
@@ -786,32 +786,34 @@
 Object( value2 )
+ )
  %7B%0A%09%09%09%09%09if ( 'un
@@ -805,34 +805,39 @@
 %7B%0A%09%09%09%09%09if ( 
-'u
+! _.isU
 ndefined
 ' !== typeof
@@ -824,28 +824,17 @@
 ndefined
-' !== typeof
+(
  value2%5B
@@ -844,16 +844,18 @@
 lue1 %5D )
+ )
  %7B%0A%09%09%09%09%09
@@ -1207,21 +1207,8 @@
 f ( 
-'string' === 
 type
@@ -1216,16 +1216,29 @@
 f value2
+ === 'string'
  ) %7B%0A%09%09%09
@@ -1697,27 +1697,19 @@
 f ( 
-'object' === typeof
+_.isObject(
  dep
@@ -1713,24 +1713,26 @@
 dependency )
+ )
  %7B%0A%09%09%09%09_.eac
@@ -1780,34 +1780,39 @@
 %7B%0A%09%09%09%09%09if ( 
-'u
+! _.isU
 ndefined
 ' !== subDep
@@ -1799,21 +1799,17 @@
 ndefined
-' !==
+(
  subDepe
@@ -1816,32 +1816,34 @@
 ndency.setting )
+ )
  %7B%0A%09%09%09%09%09%09kirkiCo
@@ -2323,26 +2323,31 @@
 %09%09%09if ( 
-'u
+! _.isU
 ndefined
 ' !== ty
@@ -2334,36 +2334,25 @@
 .isUndefined
-' !== typeof
+(
  dependency%5B
@@ -2357,22 +2357,29 @@
 y%5B0%5D
+ )
  && 
-'u
+! _.isU
 ndefined
 ' !=
@@ -2378,20 +2378,9 @@
 ined
-' !== typeof
+(
  dep
@@ -2399,16 +2399,18 @@
 etting )
+ )
  %7B%0A%09%09%09%09%09

Use underscores methods for type checking