/*
* Thickbox 3.1 - One Box To Rule Them All.
* By Cody Lindley (http://www.codylindley.com)
* Copyright (c) 2007 cody lindley
* Licensed under the MIT License: http://www.opensource.org/licenses/mit-license.php
*/
var tb_pathToImage = base_url + "images/loadingAnimation.gif";
//var tb_pathToImage = "http://localhost/easfv9/trunk/www/images/loadingAnimation.gif";
/*!!!!!!!!!!!!!!!!! edit below this line at your own risk !!!!!!!!!!!!!!!!!!!!!!!*/
//on page load call tb_init
$(document).ready(function(){
tb_init('a.thickbox, area.thickbox, input.thickbox');//pass where to apply thickbox
imgLoader = new Image();// preload image
imgLoader.src = tb_pathToImage;
});
//add thickbox to href & area elements that have a class of .thickbox
function tb_init(domChunk){
$(domChunk).click(function(){
var t = this.title || this.name || null;
var a = this.href || this.alt;
var g = this.rel || false;
tb_show(t,a,g);
this.blur();
return false;
});
}
function tb_show(caption, url, imageGroup) {//function called when the user clicks on a thickbox link
try {
if (typeof document.body.style.maxHeight === "undefined") {//if IE 6
$("body","html").css({height: "100%", width: "100%"});
$("html").css("overflow","hidden");
if (document.getElementById("TB_HideSelect") === null) {//iframe to hide select elements in ie6
$("body").append("
");
}else{//ajax modal
$("#TB_overlay").unbind();
$("#TB_window").append("");
}
}else{//this means the window is already up, we are just loading new content via ajax
$("#TB_ajaxContent")[0].style.width = ajaxContentW +"px";
$("#TB_ajaxContent")[0].style.height = ajaxContentH +"px";
$("#TB_ajaxContent")[0].scrollTop = 0;
$("#TB_ajaxWindowTitle").html(caption);
}
}
$("#TB_closeWindowButton").click(tb_remove);
if(url.indexOf('TB_inline') != -1){
$("#TB_ajaxContent").append($('#' + params['inlineId']).children());
$("#TB_window").unload(function () {
$('#' + params['inlineId']).append( $("#TB_ajaxContent").children() ); // move elements back when you're finished
});
tb_position();
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}else if(url.indexOf('TB_iframe') != -1){
tb_position();
if($.browser.safari){//safari needs help because it will not fire iframe onload
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
}else{
/*
Author: Swapnil Sarwe
Date: 23-01-2009
Comments: below load function has been changed, the random is removed to solve the URL issue
*/
// Original code:
// $("#TB_ajaxContent").load(url += "&random=" + (new Date().getTime()),function(){
// New code:
$("#TB_ajaxContent").load(url += "/random/" + (new Date().getTime()),function(){
//to do a post change this load method
tb_position();
$("#TB_load").remove();
tb_init("#TB_ajaxContent a.thickbox");
$("#TB_window").css({display:"block"});
});
}
}
if(!params['modal']){
document.onkeyup = function(e){
if (e == null) { // ie
keycode = event.keyCode;
} else { // mozilla
keycode = e.which;
}
if(keycode == 27){ // close
tb_remove();
}
};
}
} catch(e) {
//nothing here
}
}
//helper functions below
function tb_showIframe(){
$("#TB_load").remove();
$("#TB_window").css({display:"block"});
}
function tb_remove() {
$("#TB_imageOff").unbind("click");
$("#TB_closeWindowButton").unbind("click");
$("#TB_window").fadeOut("fast",function(){$('#TB_window,#TB_overlay,#TB_HideSelect').trigger("unload").unbind().remove();});
$("#TB_load").remove();
if (typeof document.body.style.maxHeight == "undefined") {//if IE 6
$("body","html").css({height: "auto", width: "auto"});
$("html").css("overflow","");
}
document.onkeydown = "";
document.onkeyup = "";
return false;
}
function tb_position() {
$("#TB_window").css({marginLeft: '-' + parseInt((TB_WIDTH / 2),10) + 'px', width: TB_WIDTH + 'px'});
if ( !(jQuery.browser.msie && jQuery.browser.version < 7)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
}
function tb_parseQuery ( query ) {
var Params = {};
if ( ! query ) {return Params;}// return empty object
var Pairs = query.split(/[;&]/);
for ( var i = 0; i < Pairs.length; i++ ) {
var KeyVal = Pairs[i].split('=');
if ( ! KeyVal || KeyVal.length != 2 ) {continue;}
var key = unescape( KeyVal[0] );
var val = unescape( KeyVal[1] );
val = val.replace(/\+/g, ' ');
Params[key] = val;
}
return Params;
}
function tb_getPageSize(){
var de = document.documentElement;
var w = window.innerWidth || self.innerWidth || (de&&de.clientWidth) || document.body.clientWidth;
var h = window.innerHeight || self.innerHeight || (de&&de.clientHeight) || document.body.clientHeight;
arrayPageSize = [w,h];
return arrayPageSize;
}
function tb_detectMacXFF() {
var userAgent = navigator.userAgent.toLowerCase();
if (userAgent.indexOf('mac') != -1 && userAgent.indexOf('firefox')!=-1) {
return true;
}
}
// JavaScript Document
function handle_selected_action(modeobj,obj,action)
{
var mode = modeobj.value;
switch(mode)
{
case 'mass_delete':
confirm_delete_sel(obj,action);
break;
case 'mass_restore':
confirm_restore_sel(obj,action);
break;
}
modeobj.selectedIndex="";
}
function handle_submit(formname,action,id)
{
var obj = document.getElementById(formname);
if(obj != "" || obj != "undefined")
{
obj.action = action;
if(isNaN(id) == false)
{
obj.id.value = id;
}
obj.submit();
}
}
function handle_submit_by_mode(formname,action,id)
{
var obj = document.getElementById(formname);
if(obj != "" || obj != "undefined")
{
obj.mode.value = action;
if(isNaN(id) == false)
{
obj.id.value = id;
}
obj.submit();
}
}
function handle_redirect(url)
{
if(url != "")
window.location = url;
}
function confirm_delete(url){
var msg = "[ WARNING : Sending Record/s to Trash] \n\n Are you sure you want to send this item to trash?";
var conf = confirm(msg);
if(conf)
{
handle_redirect(url);
}
}
function delete_perm(url){
var msg = "[ WARNING : Deleting Record/s Permanently] \n\n Are you sure you want to delete this record permanently?";
var conf = confirm(msg);
if(conf)
{
handle_redirect(url);
}
}
function confirm_approve(obj,action){
var id_arr = new Array();
var allInputs = document.getElementsByTagName("input");
for (var i = 0; i < allInputs.length; i++)
{
if (allInputs[i].type == 'checkbox' && allInputs[i].name.substring(0,11) == "tablechoice")
{
id_arr.push(allInputs[i]);
}
}
if (isOneChecked(id_arr) == true)
{
var msg = "[ WARNING : Approving Record/s ] \n\n Are you sure you want to approve the Record/s?";
var conf = confirm(msg);
if(conf)
{
handle_submit(obj, action);
}
else
{
return false;
}
}
else
{
alert("Please select the record to approve");
return false;
}
}
function confirm_delete_submit(formname,action,id){
var msg = "[ WARNING : Sending Record/s to Trash] \n\n Are you sure you want to send this item to trash?";
var conf = confirm(msg);
if(conf)
{
handle_submit(formname,action,id);
}
}
function confirm_send_new_password(formname,action,id){
var msg = "[ WARNING : Sending New Password ] \n\n Are you sure you want to send a new password?";
var conf = confirm(msg);
if(conf)
{
handle_submit(formname,action,id);
}
}
function confirm_restore(url)
{
var msg = "[WARNING] Are you sure you want to restore the record?";
//var msg = "[ WARNING : Deleting Record/s ] \n\n Are you sure you want to Restore the selected Record/s?";
var conf = confirm(msg);
if(conf)
{
handle_redirect(url);
}
}
function confirm_restore_submit(formname,action,id)
{
var msg = "[WARNING] Are you sure you want to restore the record?";
//var msg = "[ WARNING : Deleting Record/s ] \n\n Are you sure you want to Restore the selected Record/s?";
var conf = confirm(msg);
if(conf)
{
handle_submit(formname,action,id);
}
}
function confirm_restore_sel(obj,action)
{
var id_arr = new Array();
var allInputs = document.getElementsByTagName("input");
for (var i = 0; i < allInputs.length; i++)
{
if (allInputs[i].type == 'checkbox' && allInputs[i].name.substring(0,11) == "tablechoice")
{
id_arr.push(allInputs[i]);
}
}
if (isOneChecked(id_arr) == true)
{
var msg = "[ WARNING : Restoring Record/s ] \n\n Are you sure you want to retore the selected Record/s?";
var conf = confirm(msg);
if(conf)
{
handle_submit(obj, action);
}
else
{
return false;
}
}
else
{
alert("Please select the record to restore");
return false;
}
}
function confirm_delete_sel(obj,action)
{
var id_arr = new Array();
var allInputs = document.getElementsByTagName("input");
for (var i = 0; i < allInputs.length; i++)
{
if (allInputs[i].type == 'checkbox' && allInputs[i].name.substring(0,11) == "tablechoice")
{
id_arr.push(allInputs[i]);
}
}
if (isOneChecked(id_arr) == true)
{
var msg = "[ WARNING : Deleting Record/s ] \n\n Are you sure you want to send the selected Record/s to trash?";
var conf = confirm(msg);
if(conf)
{
handle_submit(obj, action);
}
else
{
return false;
}
}
else
{
alert("Please select the record to delete");
return false;
}
}
function confirm_update_sel(obj,action)
{
var id_arr = new Array();
var allInputs = document.getElementsByTagName("input");
for (var i = 0; i < allInputs.length; i++)
{
if (allInputs[i].type == 'checkbox' && allInputs[i].name.substring(0,11) == "tablechoice")
{
id_arr.push(allInputs[i]);
}
}
if (isOneChecked(id_arr) == true)
{
var msg = "[ WARNING : Updating Record/s ] \n\n Are you sure you want to update the selected Record/s?";
var conf = confirm(msg);
if(conf)
{
handle_submit(obj, action);
}
else
{
return false;
}
}
else
{
alert("Please select the record to update");
return false;
}
}
function isOneChecked(CheckboxArray)
{
for (var i = 0; i < CheckboxArray.length; i++)
{
if (CheckboxArray[i].checked)
{
return true;
}
}
return false;
}
// Active/Inactive record
function change_active(url ,value)
{
if( value == 0 )
{
var msg = "[WARNING] Are you sure you want to make this record inactive?";
}
else
{
var msg = "[WARNING] Are you sure you want to make this record active?";
}
if( confirm(msg) )
{
handle_redirect(url);
}
}
// featured / remove featured
function change_featured(url ,value)
{
if( value == 0 )
{
var msg = "[WARNING] Are you sure you want to make this record non featured?";
}
else
{
var msg = "[WARNING] Are you sure you want to make this record featured?";
}
if( confirm(msg) )
{
handle_redirect(url);
}
}
// featured / remove featured
function change_approved(url ,value)
{
if( value == 0 )
{
var msg = "[WARNING] Are you sure you want to make this record unapproved?";
}
else
{
var msg = "[WARNING] Are you sure you want to make this record approved?";
}
if( confirm(msg) )
{
handle_redirect(url);
}
}
// Change the status
function change_tstatus(url)
{
var msg = "[WARNING] Are you sure you want to change the status?";
if( confirm(msg) )
{
handle_redirect(url);
}
}
function change_active_submit(formname,action,id,value)
{
if( value == 0 )
{
var msg = "[WARNING] Are you sure you want to make this record inactive?";
}
else
{
var msg = "[WARNING] Are you sure you want to make this record active?";
}
if( confirm(msg) )
{
handle_submit(formname,action,id);
}
}
// fade in & fade out
function show_div_info_slow()
{
//window.onload = function()
//{
//options: slow, fast and time
$("div#div_info").show("slow");
//}
setTimeout("hide_div_info_slow()",20000);
}
function hide_div_info_slow()
{
$("div#div_info").hide("slow");
}
function show_div_msg_slow()
{
$("div#div_msg").show("slow");
setTimeout("hide_div_msg_slow()",20000);
}
function hide_div_msg_slow()
{
$("div#div_msg").hide("slow");
}
function show_div_error_slow()
{
//window.onload = function()
//{
//options: slow, fast and time
$("div#div_error").show("slow");
//}
setTimeout("hide_div_error_slow()",20000);
}
function hide_div_error_slow()
{
$("div#div_error").hide("slow");
}
/*********************************************************************************/
//This functions are used for changing the rank
function change_rank(id,crank,total,formname,action)
{
var form_obj = document.getElementById(formname);
if(form_obj != "" || form_obj != "undefined")
{
if(total > 1)
{
var nrank = prompt("Please Enter Rank Value [ 1 - "+total+" ] ","");
if(ver_rank(nrank,crank,total))
{
if(nrank > crank)
{
form_obj.r_mode.value='decrease';
}
else
{
form_obj.r_mode.value='increase';
}
form_obj.mode.value='change_rank';
form_obj.new_rank.value=nrank;
form_obj.curr_rank.value=crank;
form_obj.id.value=id;
form_obj.action = action;
form_obj.submit();
}
}
else
{
alert("Only 1 Record Present Can't change rank.");
}
}
}
function ver_rank(nr,cr,tr)
{
if(isNaN(nr))
{
alert("Please enter only numbers");
return false;
}
else
{
var str = new String(nr);
arr = str.split(".");
if( arr.length > 1 )
{
alert("Only integer values supported");
return false;
}
}
if(nr == '')
{
alert("Please enter rank");
return false;
}
if(nr == cr)
{
alert("Current & New rank is same");
return false;
}
if(nr == null){
return false;
}
if(nr<1)
{
alert("New rank cannot be less than one");
return false;
}
if(Number(nr)>Number(tr))
{
alert("New rank cannot be more than total rank");
return false;
}
return true;
}
/*********************************************************************************/
/**
AJAX function
@author - Dhaval K 16th Jan, 2009
@param - processing script URL
@param - form name to be posted
@param - div id where contents loaded
@example - ajaxCall("includes/searchProcessor.php", "frmName", "divid");
*/
function ajaxCall(ajax_url, frm, div, data_values)
{
var formValues = "";
formValues = $('form#'+frm).serializeArray();
$.ajax({
type: "POST",
url: ajax_url,
data: formValues,
beforeSend: function(){
{
// document.getElementById(div).innerHTML = '';
}
},
success: function(msg){
$('#'+div).html(msg);
}
});
}
/*********************************************************************************/
/**
AJAX function
@author - Archana Naik 16th Jan, 2009
@param - processing script URL
@param - banner id to be pasased
@param - ajax url to be pasased
@example - update_click("ajax_call/update_click", "bannerid");
*/
function update_click(ajax_url, data_values, url)
{
var formValues = "";
formValues = data_values;
$.ajax({
type: "POST",
url: ajax_url,
data: formValues ,
success: function(url){
window.location = url;
}
});
}
/**
AJAX function pass data
@author - Dhaval K 16th Jan, 2009
@param - processing script URL
@param - form name to be posted
@param - div id where contents loaded
@example - ajaxCall("includes/searchProcessor.php", "frmName", "divid");
*/
function ajaxCallPassData(ajax_url, div, data_values)
{
var formValues = "";
formValues = data_values;
$.ajax({
type: "POST",
url: ajax_url,
data: formValues,
beforeSend: function(){
{
document.getElementById(div).innerHTML = '';
}
},
success: function(msg){
$('#'+div).html(msg);
}
});
}
/**
function confirm_send_reply(url){
var msg = "[ WARNING : Sending New Password ] \n\n Are you sure you want to send a reply?";
var conf = confirm(msg);
if(conf)
{
handle_redirect(url);
}
}**/
function confirm_send_reply(module,submit_name){
var msg = "[ WARNING : Sending Reply ] \n\n Are you sure you want to send a reply?";
var conf = confirm(msg);
if(conf)
{
handle_submit(module,submit_name);
}
}
function dropDownSelect(selectID,optionValue)
{
selObj = document.getElementById(selectID);
for(i=0;i
*
*/
function _set_interface() {
// Apply the HTML markup into body tag
$('body').append('
');
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
$('#jquery-overlay').css({
backgroundColor: settings.overlayBgColor,
opacity: settings.overlayOpacity,
width: arrPageSizes[0],
height: arrPageSizes[1]
}).fadeIn();
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
left: arrPageScroll[0]
}).show();
// Assigning click events in elements to close overlay
$('#jquery-overlay,#jquery-lightbox').click(function() {
_finish();
});
// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
_finish();
return false;
});
// If window was resized, calculate the new overlay dimensions
$(window).resize(function() {
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
$('#jquery-overlay').css({
width: arrPageSizes[0],
height: arrPageSizes[1]
});
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
top: arrPageScroll[1] + (arrPageSizes[3] / 10),
left: arrPageScroll[0]
});
});
}
/**
* Prepares image exibition; doing a imageīs preloader to calculate itīs size
*
*/
function _set_image_to_view() { // show the loading
// Show the loading
$('#lightbox-loading').show();
if ( settings.fixedNavigation ) {
$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
} else {
// Hide some elements
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
}
// Image preload process
var objImagePreloader = new Image();
objImagePreloader.onload = function() {
$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
// Perfomance an effect in the image container resizing it
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
// clear onLoad, IE behaves irratically with animated gifs otherwise
objImagePreloader.onload=function(){};
};
objImagePreloader.src = settings.imageArray[settings.activeImage][0];
};
/**
* Perfomance an effect in the image container resizing it
*
* @param integer intImageWidth The imageīs width that will be showed
* @param integer intImageHeight The imageīs height that will be showed
*/
function _resize_container_image_box(intImageWidth,intImageHeight) {
// Get current width and height
var intCurrentWidth = $('#lightbox-container-image-box').width();
var intCurrentHeight = $('#lightbox-container-image-box').height();
// Get the width and height of the selected image plus the padding
var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the imageīs width and the left and right padding value
var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the imageīs height and the left and right padding value
// Diferences
var intDiffW = intCurrentWidth - intWidth;
var intDiffH = intCurrentHeight - intHeight;
// Perfomance the effect
$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
if ( $.browser.msie ) {
___pause(250);
} else {
___pause(100);
}
}
$('#lightbox-container-image-data-box').css({ width: intImageWidth });
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
};
/**
* Show the prepared image
*
*/
function _show_image() {
$('#lightbox-loading').hide();
$('#lightbox-image').fadeIn(function() {
_show_image_data();
_set_navigation();
});
_preload_neighbor_images();
};
/**
* Show the image information
*
*/
function _show_image_data() {
$('#lightbox-container-image-data-box').slideDown('fast');
$('#lightbox-image-details-caption').hide();
if ( settings.imageArray[settings.activeImage][1] ) {
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
}
// If we have a image set, display 'Image X of X'
if ( settings.imageArray.length > 1 ) {
$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
}
}
/**
* Display the button navigations
*
*/
function _set_navigation() {
$('#lightbox-nav').show();
// Instead to define this configuration in CSS file, we define here. And itīs need to IE. Just.
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}
// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
// Enable keyboard navigation
_enable_keyboard_navigation();
}
/**
* Enable a support to keyboard navigation
*
*/
function _enable_keyboard_navigation() {
$(document).keydown(function(objEvent) {
_keyboard_action(objEvent);
});
}
/**
* Disable the support to keyboard navigation
*
*/
function _disable_keyboard_navigation() {
$(document).unbind();
}
/**
* Perform the keyboard actions
*
*/
function _keyboard_action(objEvent) {
// To ie
if ( objEvent == null ) {
keycode = event.keyCode;
escapeKey = 27;
// To Mozilla
} else {
keycode = objEvent.keyCode;
escapeKey = objEvent.DOM_VK_ESCAPE;
}
// Get the key in lower case form
key = String.fromCharCode(keycode).toLowerCase();
// Verify the keys to close the ligthBox
if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
_finish();
}
// Verify the key to show the previous image
if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
// If weīre not showing the first image, call the previous
if ( settings.activeImage != 0 ) {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
// Verify the key to show the next image
if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
// If weīre not showing the last image, call the next
if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
}
/**
* Preload prev and next images being showed
*
*/
function _preload_neighbor_images() {
if ( (settings.imageArray.length -1) > settings.activeImage ) {
objNext = new Image();
objNext.src = settings.imageArray[settings.activeImage + 1][0];
}
if ( settings.activeImage > 0 ) {
objPrev = new Image();
objPrev.src = settings.imageArray[settings.activeImage -1][0];
}
}
/**
* Remove jQuery lightBox plugin HTML markup
*
*/
function _finish() {
$('#jquery-lightbox').remove();
$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility' : 'visible' });
}
/**
/ THIRD FUNCTION
* getPageSize() by quirksmode.com
*
* @return Array Return an array with page width, height and window width, height
*/
function ___getPageSize() {
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
};
/**
/ THIRD FUNCTION
* getPageScroll() by quirksmode.com
*
* @return Array Return an array with x,y page scroll values.
*/
function ___getPageScroll() {
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
};
/**
* Stop the code execution from a escified time in milisecond
*
*/
function ___pause(ms) {
var date = new Date();
curDate = null;
do { var curDate = new Date(); }
while ( curDate - date < ms);
};
// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
return this.unbind('click').click(_initialize);
};
})(jQuery); // Call and execute the function immediately passing the jQuery objectif(typeof deconcept=="undefined"){var deconcept=new Object();}
if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}
if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}
deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a,_b){if(!document.getElementById){return;}
this.DETECT_KEY=_b?_b:"detectflash";
this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params=new Object();
this.variables=new Object();
this.attributes=new Array();
if(_1){this.setAttribute("swf",_1);}
if(id){this.setAttribute("id",id);}
if(w){this.setAttribute("width",w);}
if(h){this.setAttribute("height",h);}
if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}
this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();
if(c){this.addParam("bgcolor",c);}
var q=_8?_8:"high";
this.addParam("quality",q);
this.setAttribute("useExpressInstall",_7);
this.setAttribute("doExpressInstall",false);
var _d=(_9)?_9:window.location;
this.setAttribute("xiRedirectUrl",_d);
this.setAttribute("redirectUrl","");
if(_a){this.setAttribute("redirectUrl",_a);}};
deconcept.SWFObject.prototype={setAttribute:function(_e,_f){
this.attributes[_e]=_f;
},getAttribute:function(_10){
return this.attributes[_10];
},addParam:function(_11,_12){
this.params[_11]=_12;
},getParams:function(){
return this.params;
},addVariable:function(_13,_14){
this.variables[_13]=_14;
},getVariable:function(_15){
return this.variables[_15];
},getVariables:function(){
return this.variables;
},getVariablePairs:function(){
var _16=new Array();
var key;
var _18=this.getVariables();
for(key in _18){_16.push(key+"="+_18[key]);}
return _16;},getSWFHTML:function(){var _19="";
if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){
if(this.getAttribute("doExpressInstall")){
this.addVariable("MMplayerType","PlugIn");}
_19="