[10819] | 1 | {combine_css path=$B2F_PATH|@cat:"template/style.css"} |
---|
[11219] | 2 | {combine_script id="jquery" load="header" path = "themes/default/js/jquery.min.js"} |
---|
[10819] | 3 | |
---|
| 4 | {footer_script require="jquery"} |
---|
[10821] | 5 | jQuery(document).ready(function () {ldelim} |
---|
[10852] | 6 | |
---|
| 7 | {if $b2f_switch_mode == 'click'} |
---|
[10821] | 8 | jQuery('.reverse').click(function() {ldelim} |
---|
| 9 | if (jQuery(this).attr('rel') == 'front') {ldelim} |
---|
[10852] | 10 | {else} |
---|
| 11 | jQuery('.reverse').hover(function() {ldelim} |
---|
| 12 | {/if} |
---|
| 13 | |
---|
| 14 | /* picture switch */ |
---|
| 15 | {if $b2f_transition == 'fade'} |
---|
[12363] | 16 | jQuery('img#theMainImage').animate({ldelim} |
---|
[10852] | 17 | opacity:0 |
---|
| 18 | }, 400, function() {ldelim} |
---|
[11219] | 19 | jQuery(this).attr({ldelim} |
---|
| 20 | src: '{$VERSO_URL}', |
---|
| 21 | style: 'max-width:{$WIDTH_IMG}px;max-height:{$HEIGHT_IMG}px;', |
---|
| 22 | }); |
---|
[10852] | 23 | jQuery(this).animate({ldelim} |
---|
[11219] | 24 | opacity:1 |
---|
| 25 | }, 400); |
---|
[10852] | 26 | }); |
---|
| 27 | {else} |
---|
[12363] | 28 | jQuery('img#theMainImage').attr({ldelim} |
---|
[10821] | 29 | src: '{$VERSO_URL}', |
---|
[11219] | 30 | style: 'max-width:{$WIDTH_IMG}px;max-height:{$HEIGHT_IMG}px;', |
---|
[10821] | 31 | }); |
---|
[10852] | 32 | {/if} |
---|
| 33 | |
---|
| 34 | {if $b2f_switch_mode == 'click'} |
---|
| 35 | /* hd link */ |
---|
[10821] | 36 | {if isset($VERSO_HD)} |
---|
[12363] | 37 | jQuery('img#theMainImage').parent('a').attr({ldelim} |
---|
[10821] | 38 | href: "javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" |
---|
| 39 | }); |
---|
| 40 | {/if} |
---|
[10852] | 41 | |
---|
[10821] | 42 | /* B2F link content */ |
---|
[11219] | 43 | jQuery(this).html('<img src="{$B2F_PATH}template/rotate_2.png"/> {$b2f_see_front}'); |
---|
[10821] | 44 | jQuery(this).attr('rel', 'back'); |
---|
[10852] | 45 | {/if} |
---|
[10821] | 46 | |
---|
[10852] | 47 | {if $b2f_switch_mode == 'click'} |
---|
[10821] | 48 | } else if (jQuery(this).attr('rel') == 'back') {ldelim} |
---|
[10852] | 49 | {else} |
---|
| 50 | }, function() {ldelim} |
---|
| 51 | {/if} |
---|
| 52 | |
---|
[11219] | 53 | /* picture switch */ |
---|
[10852] | 54 | {if $b2f_transition == 'fade'} |
---|
[12363] | 55 | jQuery('img#theMainImage').animate({ldelim} |
---|
[10852] | 56 | opacity:0 |
---|
| 57 | }, 400, function() {ldelim} |
---|
[11219] | 58 | jQuery(this).attr({ldelim} |
---|
| 59 | src: '{$SRC_IMG}', |
---|
| 60 | style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;', |
---|
| 61 | }); |
---|
[10852] | 62 | jQuery(this).animate({ldelim} |
---|
[11219] | 63 | opacity:1 |
---|
| 64 | }, 400); |
---|
[10852] | 65 | }); |
---|
| 66 | {else} |
---|
[12363] | 67 | jQuery('img#theMainImage').attr({ldelim} |
---|
[10821] | 68 | src: '{$SRC_IMG}', |
---|
| 69 | style: 'width:{$WIDTH_IMG}px;height:{$HEIGHT_IMG}px;', |
---|
| 70 | }); |
---|
[10852] | 71 | {/if} |
---|
[10821] | 72 | |
---|
[10852] | 73 | {if $b2f_switch_mode == 'click'} |
---|
[11219] | 74 | /* hd link */ |
---|
[10852] | 75 | {if isset($high.U_HIGH)} |
---|
[12363] | 76 | jQuery('img#theMainImage').parent('a').attr({ldelim} |
---|
[10852] | 77 | href: "javascript:phpWGOpenWindow('{$high.U_HIGH}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')" |
---|
[10821] | 78 | }); |
---|
| 79 | {/if} |
---|
| 80 | |
---|
[11219] | 81 | /* B2F link content */ |
---|
| 82 | jQuery(this).html('<img src="{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back}'); |
---|
[10821] | 83 | jQuery(this).attr('rel', 'front'); |
---|
[10852] | 84 | {/if} |
---|
| 85 | |
---|
| 86 | {if $b2f_switch_mode == 'click'} |
---|
[10821] | 87 | } |
---|
| 88 | }); |
---|
[10852] | 89 | {else} |
---|
| 90 | }); |
---|
| 91 | {/if} |
---|
| 92 | |
---|
[10821] | 93 | }); |
---|
[10819] | 94 | {/footer_script} |
---|
| 95 | |
---|
[11219] | 96 | <img src="{$VERSO_URL}" style="display:none;"/> {* <!-- force preload the verso --> *} |
---|
[10852] | 97 | |
---|
[11219] | 98 | {if $b2f_position != 'toolbar'}<div>{/if} |
---|
[12361] | 99 | <a class="reverse" rel="front" class="pwg-state-default pwg-button" title="{$b2f_see_back}" {if $b2f_position == 'toolbar'}style="border:none !important;"{/if} |
---|
[11599] | 100 | {if $b2f_switch_mode == 'hover' and isset($VERSO_HD)}href="javascript:phpWGOpenWindow('{$VERSO_HD}','{$high.UUID}','scrollbars=yes,toolbar=no,status=no,resizable=yes')"{/if}> |
---|
[11219] | 101 | <img src="{$B2F_PATH}template/rotate_1.png"/> {$b2f_see_back} |
---|
[10852] | 102 | </a> |
---|
[11219] | 103 | {if $b2f_position != 'toolbar'}</div>{/if} |
---|