mirror of
https://github.com/byReqz/webdriverinstaller.git
synced 2024-11-15 02:33:15 +00:00
91 lines
14 KiB
JavaScript
91 lines
14 KiB
JavaScript
|
/*!
|
||
|
* flipLightBox - Responsive Lightbox jQuery Plugin
|
||
|
* version: 1.0.1
|
||
|
* @requires jQuery v1.5 or later
|
||
|
*
|
||
|
* License at http://flipgallery.net/fliplightbox.html#download
|
||
|
*
|
||
|
* Example at http://flipgallery.net/fliplightbox.html
|
||
|
*
|
||
|
* Copyright 2013 flipGallery.net
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
(function( $ ){
|
||
|
|
||
|
$.fn.flipLightBox = function(flb_options) {
|
||
|
|
||
|
var flb_settings = $.extend({
|
||
|
|
||
|
// FLIP MODE SETTINGS
|
||
|
// ------------------
|
||
|
|
||
|
flip_mode: 1,
|
||
|
|
||
|
// 1 = Flip On & 0 = Flip Off (fade).
|
||
|
|
||
|
// VISUAL SETTINGS
|
||
|
// ---------------
|
||
|
|
||
|
lightbox_background_opacity: 0.8,
|
||
|
|
||
|
lightbox_border_width: 10, // (pixels)
|
||
|
|
||
|
lightbox_border_color: '#fff',
|
||
|
|
||
|
lightbox_z_index: '1000',
|
||
|
|
||
|
// SPEED SETTINGS
|
||
|
// --------------
|
||
|
|
||
|
lightbox_flip_speed: 800,
|
||
|
|
||
|
// Speed of complete lightbox flip or fade (milliseconds).
|
||
|
|
||
|
// TEXT SETTINGS
|
||
|
// -------------
|
||
|
|
||
|
// *Picture/Lightbox Text Settings*
|
||
|
|
||
|
lightbox_text_status: 1,
|
||
|
|
||
|
// 1 = On & 0 = Off.
|
||
|
|
||
|
lightbox_text_style: 'font-size: 14px; line-height: 1.4; color: #000; text-align: center;',
|
||
|
|
||
|
lightbox_text_background_style: 'background-color: #fff; opacity:0.8;',
|
||
|
|
||
|
lightbox_text_area_position: 'bottom',
|
||
|
|
||
|
// bottom or top
|
||
|
|
||
|
// *Picture/Lightbox Navigation Text Settings*
|
||
|
|
||
|
lightbox_navigation_status: 1,
|
||
|
|
||
|
// 1 = On & 0 = Off.
|
||
|
|
||
|
next_image_text: 'Next ››',
|
||
|
|
||
|
back_image_text: '‹‹ Back',
|
||
|
|
||
|
next_and_back_image_text_style: 'font-weight: bold; color: #000;',
|
||
|
|
||
|
image_number_page: 'Image',
|
||
|
|
||
|
image_number_of: 'of',
|
||
|
|
||
|
image_number_text_style: 'color: #000;',
|
||
|
|
||
|
// *Image Streaming Text Settings*
|
||
|
|
||
|
loading_text_color: '#fff',
|
||
|
|
||
|
loading_text_opacity: '0.3'
|
||
|
|
||
|
}, flb_options );
|
||
|
|
||
|
var flb_loading_image="data:image/gif;base64,R0lGODlhCgARAIABAP///////yH5BAEAAAEALAAAAAAKABEAAAIWTIBpl80No5y00gdXXBjxD4biSJZGAQA7";var flb_close_image="data:image/gif;base64,R0lGODlhMgAyAIABAP///////yH5BAEAAAEALAAAAAAyADIAAALPjI+py+0Po5y0HoCz3rx7/HziKDbkiWZLyp5Kd7VcvL01ImvJvOu2vPLhVAxgkTgEmVIOIQ0QcjWRT+i0dFUmqUFP1GmAZcE/sndsXfK2N3X6KGa3j5BPOW4JjO54ConfJ/HXMygoJWcXwUR46FZYtffVGIZiOKl3iXaGuDZx+egXyclVIQpJ1iPZSRnIqGrWKveqdTr71gWLOnrLd2erW1X2O4cr7GhqvHUMqszIi2mUDOnc4kudljO3Cp3djdsdfQ3OvDu+nYeerr7Ojl4AADs=";var flb_blank_image="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAABBJREFUeNpi+P//PwNAgAEACPwC/tuiTRYAAAAASUVORK5CYII=";var flb_image_innit_width;var flb_box_sizing='box-sizing: content-box; -moz-box-sizing: content-box; -webkit-box-sizing: content-box;';var flb_distance_from_top;var flb_new_height;var flb_new_width;var flb_placement;var flb_i;var flb_total_lightbox_width;var flb_loading;var flb_in_img;var flb_image_name;var flb_class;var flb_textcontent;var flb_lightbox_data;var flb_total_images;var fgi_lb_name='flipLightBox';var fgi_lb_ind_name;var flb_classnum=1;var flb_itemnum;var flb_clickclass;var flb_classamount=new Array();function flb_find(){if(flb_classnum==1){fgi_lb_ind_name=fgi_lb_name}else{fgi_lb_ind_name=fgi_lb_name;fgi_lb_ind_name+=flb_classnum}if($('.'+fgi_lb_ind_name)[0]){$('.'+fgi_lb_ind_name+' span').hide();flb_itemnum=0;$('.'+fgi_lb_ind_name).each(function(){flb_itemnum=flb_itemnum+1;$(this).attr('class',fgi_lb_ind_name+'-'+flb_itemnum);if(flb_clickclass==null){flb_clickclass='.'+fgi_lb_ind_name+'-'+flb_itemnum}else{flb_clickclass+=', .'+fgi_lb_ind_name+'-'+flb_itemnum}});flb_classamount[fgi_lb_ind_name]=flb_itemnum;flb_classnum++;flb_find()}}flb_find();$(this).append('<div id="flb-lightbox" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; z-index: '+flb_settings.lightbox_z_index+'; '+flb_box_sizing+'"><div id="flb-lightbox-background" style="width: 100%; height: 100%; background-color: #000; opacity:'+flb_settings.lightbox_background_opacity+'; '+flb_box_sizing+'"></div><div id="flb-lightbox-content" style="position: fixed; top: 0px; left: 0px; width: 100%; height: 100%; background: none; text-align: center; '+flb_box_sizing+'"></div><div id="flb-load" style="position: fixed; top: 40%; left: 0px; width: 100%; text-align: center; font-size: 14px; color: '+flb_settings.loading_text_color+'; opacity: '+flb_settings.loading_text_opacity+'; '+flb_box_sizing+'"></div><div id="flb-lightbox-text" style="position: fixed; '+flb_settings.lightbox_text_area_position+': 0px; width: 90%; padding-left: 5%; padding-right: 6%; margin-right: auto; margin-left: auto;'+flb_settings.lightbox_text_background_style+' '+flb_settings.lightbox_text_style+' '+flb_box_sizing+' padding-top: 15px; padding-bottom: 15px;"></div><div id="flb-load2" style="position: fixed; top: 40%; left: 0px; width: 100%; text-align: center; font-size: 14px; color: '+flb_settings.loading_text_color+'; opacity: '+flb_settings.loading_text_opacity+';"></div>');$("#flb-lightbox, #flb-lightbox-content, #flb-lightbox-text").hide();function flb_get_image_width(a){var b=new Image();b.src=a;return b.width}function flb_get_image_height(a){var b=new Image();b.src=a;return b.height}function flb_iphone_check(){return((navigator.platform.indexOf("iPhone")!=-1)||(navigator.platform.indexOf("iPod")!=-1))}function flb_load_animation(){$("#flb-load").html('<div id="flb-loading-img"></div>').show();setTimeout(function(){$("#flb-loading-img").html('<br />Loading Image')},500);setTimeout(function(){$("#flb-loading-img").prepend('<img width="5" src="'+flb_loading_image+'" /> ')},1000);setTimeout(function(){$("#flb-loading-img").prepend('<img width="5" src="'+flb_loading_image+'" /> ')},1500);setTimeout(function(){$("#flb-loading-img").prepend('<img width="5" src="'+flb_loading_image+'" /> ')},2000);setTimeout(function(){$("#flb-loading-img").fadeOut(500)},2500);flb_loading=setTimeout(function(){flb_load_animation()},3000)}$(flb_clickclass).click(function(e){e.preventDefault();
|
||
|
|
||
|
})( jQuery );
|