| | 105 | |
| | 106 | function toggleControl(element) { |
| | 107 | for(key in mapControls) { |
| | 108 | var control = mapControls[key]; |
| | 109 | //alert ($(element).is('.ui-state-active')); |
| | 110 | if(element.name == key && $(element).is('.ui-state-active')) { |
| | 111 | control.activate(); |
| | 112 | } else { |
| | 113 | control.deactivate(); |
| | 114 | } |
| | 115 | } |
| | 116 | } |
| | 117 | |
| | 118 | $(function(){ |
| | 119 | $(".fg-button:not(.ui-state-disabled)") |
| | 120 | .hover( |
| | 121 | function(){ |
| | 122 | $(this).addClass("ui-state-hover"); |
| | 123 | }, |
| | 124 | function(){ |
| | 125 | $(this).removeClass("ui-state-hover"); |
| | 126 | } |
| | 127 | ) |
| | 128 | .mousedown(function(){ |
| | 129 | $(this).parents('.fg-buttonset-single:first').find(".fg-button.ui-state-active").removeClass("ui-state-active"); |
| | 130 | if( $(this).is('.ui-state-active.fg-button-toggleable, .fg-buttonset-multi .ui-state-active') ){ $(this).removeClass("ui-state-active"); } |
| | 131 | else { $(this).addClass("ui-state-active"); } |
| | 132 | }) |
| | 133 | .mouseup(function(){ |
| | 134 | if(! $(this).is('.fg-button-toggleable, .fg-buttonset-single .fg-button, .fg-buttonset-multi .fg-button') ){ |
| | 135 | $(this).removeClass("ui-state-active"); |
| | 136 | } |
| | 137 | }); |
| | 138 | }); |
| | 139 | |
| | 140 | $(document).ready(function(){ |
| | 141 | |
| | 142 | $('#btnPrev[title], #btnNext[title], a[title]').qtip({ |
| | 143 | style: { |
| | 144 | name: 'dark', |
| | 145 | tip: true, |
| | 146 | border:{width:2,color:'#fe8701',radius:3}, |
| | 147 | width:{min:120} |
| | 148 | } |
| | 149 | }); |
| | 150 | }); |
| | 151 | |
| | 152 | |
| | 153 | |