2 var initLayout = function() {
3 var hash = window.location.hash.replace('#', '');
4 var currentTab = $('ul.navigationTabs a')
5 .bind('click', showTab)
6 .filter('a[rel=' + hash + ']');
7 if (currentTab.size() == 0) {
8 currentTab = $('ul.navigationTabs a:first');
10 showTab.apply(currentTab.get(0));
11 $('#colorpickerHolder').ColorPicker({flat: true});
12 $('#colorpickerHolder2').ColorPicker({
15 onSubmit: function(hsb, hex, rgb) {
16 $('#colorSelector2 div').css('backgroundColor', '#' + hex);
19 $('#colorpickerHolder2>div').css('position', 'absolute');
21 $('#colorSelector2').bind('click', function() {
22 $('#colorpickerHolder2').stop().animate({height: widt ? 0 : 173}, 500);
25 $('#colorpickerField1, #colorpickerField2, #colorpickerField3').ColorPicker({
26 onSubmit: function(hsb, hex, rgb, el) {
28 $(el).ColorPickerHide();
30 onBeforeShow: function () {
31 $(this).ColorPickerSetColor(this.value);
34 .bind('keyup', function(){
35 $(this).ColorPickerSetColor(this.value);
37 $('#colorSelector').ColorPicker({
39 onShow: function (colpkr) {
40 $(colpkr).fadeIn(500);
43 onHide: function (colpkr) {
44 $(colpkr).fadeOut(500);
47 onChange: function (hsb, hex, rgb) {
48 $('#colorSelector div').css('backgroundColor', '#' + hex);
53 var showTab = function(e) {
54 var tabIndex = $('ul.navigationTabs a')
55 .removeClass('active')
66 EYE.register(initLayout, 'init');