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