1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
// enqueue Jquery scripts
function shift_scripts() {
	global $bp;

	//wp_enqueue_script('jquery', '', '', '', true);
	wp_enqueue_script('jquery-ui-tabs');
  	wp_enqueue_script('jquery-ui-dialog');
  	wp_enqueue_script('jquery-ui-draggable');

	// wp_enqueue_script('jquery-ui-core', '', '', '', true);
	// wp_enqueue_script('jquery-ui-tabs', '', '', '', true);
	// wp_enqueue_script('jquery-ui-resizable', '', '', '', true);
	// wp_enqueue_script('jquery-ui-draggable', '', '', '', true);
	// wp_enqueue_script('jquery-ui-selectable', '', '', '', true);
 //    wp_enqueue_script('jquery-ui-dialog');         
    
	// load other jquery libraries on non-admin pages
	if( !is_admin() ) {		
		
		// navigation
		wp_register_script('shift-navigation',
       		THEMEROOT . 'js/navigation.js',
       		array('jquery'),
       		'1.0.1', true );
		wp_enqueue_script('shift-navigation'); 		         		

		// jquery position
		wp_register_script('jquery-position',
       		THEMEROOT . 'js/jquery.ui.position.js',
       		'',
       		'1.9', true );
       	wp_enqueue_script('jquery-position');     
  
		// jquery dialog modified
		wp_register_script('jquery-dialog-mod',
       		THEMEROOT . 'js/jquery.ui.dialog.mod.js',
       		array('jquery', 'jquery-ui-core'),
       		'1.7.3', true );
       	wp_enqueue_script('jquery-dialog-mod');		

		// jquery carousel
		wp_register_script('jquery-carousel',
       		THEMEROOT . 'js/jquery.jcarousel.js',
       		'',
       		'1.3.1', true );
       	wp_enqueue_script('jquery-carousel');

       	// jquery easyslider
		wp_register_script('jquery-easyslider',
       		THEMEROOT . 'js/jquery.easy.js',
       		'',
       		'1.0.1', true );
       	wp_enqueue_script('jquery-easyslider'); 
       	
       	// jquery innerfade
		wp_register_script('jquery-innerfade',
       		THEMEROOT . 'js/jquery.innerfade.js',
       		'',
       		'1.0.1', true );
       	wp_enqueue_script('jquery-innerfade');   
       	
       	// jquery validate
		wp_register_script('jquery-validate',
       		THEMEROOT . 'js/jquery.validate.js',
       		'',
       		'1.0.1', true );
       	wp_enqueue_script('jquery-validate'); 
       	
       	// jquery pretty photo
		wp_register_script('jquery-pretty-photo',
       		THEMEROOT . 'js/jquery.pretty.js',
       		'',
       		'1.0.1', true );
       	wp_enqueue_script('jquery-pretty-photo');  
       	
		// jquery easing
		wp_register_script('jquery-easing',
       		THEMEROOT . 'js/jquery.easing.1.3.js',
       		'',
       		'1.3.1', true );
       	wp_enqueue_script('jquery-easing');  

		// jquery cookie
		wp_register_script('jquery-cookie',
       		THEMEROOT . 'js/jquery.cookie.js',
       		array('jquery'),
       		'1.0.1', true );
       	wp_enqueue_script('jquery-cookie'); 
       	
		// AE IMAGE RESIZE
		wp_register_script('jquery-image-resize',
       		THEMEROOT . 'js/jquery.ae.image.resize.min.js',
       		array('jquery'),
       		'1.0.1', true );
       	wp_enqueue_script('jquery-image-resize');   
       	
		// FANCY BOX
		wp_register_script('jquery-fancybox',
       		THEMEROOT . 'js/jquery.fancybox.js',
       		array('jquery'),
       		'1.0.1', true );
       	wp_enqueue_script('jquery-fancybox');      
       	
		// Text box limiter / counter
		wp_register_script('jquery-counter',
       		THEMEROOT . 'js/jquery.textareaCounter.plugin.min.js',
       		array('jquery'),
       		'1.0.1', true );
       	wp_enqueue_script('jquery-counter');      	
       	
     	// Autocomplete, not included in wordpress yet
		// Do not load this on the bp-invite-anyone pages as it interferes with its autocomplete js
		if( $bp->current_action != BP_INVITE_ANYONE_SLUG && $bp->current_component != 'messages' ) {
			wp_register_script('jquery-autocomplete',
       			THEMEROOT . 'js/jquery.autocomplete.js',
       			array('jquery'),
       			'1.2.2', true );
       		wp_enqueue_script('jquery-autocomplete'); 
		}
       	
       	// Jquery uniform form styling
		wp_register_script('jquery-uniform',
       		THEMEROOT . 'js/jquery.uniform.min.js',
       		array('jquery'),
       		'1.2.2', true );
       	wp_enqueue_script('jquery-uniform');     
       	
       	// Jquery detect internal links
		wp_register_script('jquery-urlinternal',
       		THEMEROOT . 'js/jquery.ba-urlinternal.min.js',
       		array('jquery'),
       		'1.2.2', true );
       	wp_enqueue_script('jquery-urlinternal');
       	
       	// shift global
		wp_register_script('shift-global',
       		THEMEROOT . 'js/global.js',
       		array('jquery'),
       		'1.1', true );
		wp_enqueue_script('shift-global'); 
		
		// shift functions
		wp_register_script('shift-functions',
       		THEMEROOT . 'js/jquery.functions.js',
       		array('jquery'),
       		'1.1', true );
		wp_enqueue_script('shift-functions'); 
		
		// shift widget groups
		wp_register_script('shift-widget-groups',
       		BP_PLUGIN_URL . '/bp-groups/js/widget-groups.js',
       		array('jquery'),
       		'1.1', true );
		wp_enqueue_script('shift-widget-groups');  
	  	         	 	     	        	       	       	       	       	          		   	      	             	       	       	         	      	     	
	}
}

add_action('init', 'shift_scripts');