Subversion Repositories SmartDukaan

Rev

Rev 6968 | Rev 7011 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
6967 kshitij.so 1
function toggle(containerId){
2
        var divC = document.getElementById(containerId);
3
        if (divC.style.display == 'none') {
4
            divC.style.display = 'block';
5
        } else if (divC.style.display == 'block'){
6
            divC.style.display = 'none';
7
        }
8
        else {
9
        	divC.style.display = 'none';
10
        }
11
    }
12
 
4126 varun.gupt 13
$(function(){
4984 varun.gupt 14
	function CollapsibleWidget(container)	{
15
 
16
		this.widgetContainer = container;
17
		this.collapsbiles = $(container).children('.common-widget-control-bar, .common-widget-content-area');
18
		this.isCollapsed = null;
19
 
20
		this.collapse = function()	{
21
			$(this.collapsbiles).each(function()	{
22
				$(this).slideUp();
23
			});
24
			this.isCollapsed = true;
25
		};
26
 
27
		this.open = function()	{
28
			$(this.collapsbiles).each(function()	{
29
				$(this).slideDown();
30
			});
31
			this.isCollapsed = false;
32
		};
33
 
34
		this.test = function()	{
35
		};
36
	}
4798 varun.gupt 37
 
4984 varun.gupt 38
	ResearchWidget.prototype = new CollapsibleWidget();
39
	ResearchWidget.prototype.constructor = CollapsibleWidget;
40
 
41
	function ResearchWidget(container)	{
42
		CollapsibleWidget.call(this, container);
43
	}
44
 
4798 varun.gupt 45
	function updateCompareCount()	{
46
		$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length);
47
	}
48
 
4126 varun.gupt 49
	/** Sidebar Widgets **/
4237 varun.gupt 50
 
6840 kshitij.so 51
	$('#otg_know_more,.otg_know_more').click(function(){
6552 kshitij.so 52
		$.colorbox({
53
    		width: "490px",
6772 kshitij.so 54
    		height: "420px",
6552 kshitij.so 55
    		inline: true,
56
    		href: "<h3 style='text-align: center; margin: 18px; font-size: 14px;'>On Time Guarantee, We Pay if we Delay</h3>" +
57
		"<p style='text-align: justify; margin-left: 12px; margin-right: 12px; margin-bottom: 9px; line-height: 22px;'>Saholic stands for 100% on time delivery. We ensure all your orders reach your doorstep on or "+
58
        "before the promised delivery date. In the rare case that we deliver an order later than promised "+
59
        "we will compensate you.This Guarantee is Valid on"+
60
        "</p>" +
61
        "<ul style='list-style: disc none none; margin-left: 25px; text-align: justify; margin-right:12px; line-height: 22px;'><li>All Mobiles, Cameras, Laptops, Tablets and Accessories above Rs. 2000 in value."+
62
        "</li>"+
63
        "<li>Orders Placed using Credit/Debit Card, Net Banking, EMI, Prepaid Cash Cards."+
64
        "</li>"+
65
        "</ul>"+
6772 kshitij.so 66
        "<p style='text-align: justify; line-height: 22px; margin: 12px;'>Compensation for delay is in the form of Gift Vouchers at the rate of Rs. 50 per business day. " +
67
        "GV can be applied to ANY product on Saholic.com without limitation.</p>"+
6598 amit.gupta 68
        "<span class='right'><a target='_blank' href='/static/on-time-guarantee' style='margin-right: 12px';>Detailed Terms & Conditions</a></span>",
6552 kshitij.so 69
        onComplete: function(){
70
		trackEventWithGA('Widget', 'OTG Know More is clicked', '');
71
			}
72
    	});
73
	});
74
 
4237 varun.gupt 75
	$('#shoppingExpInfo').click(function(){
76
		$.colorbox({
4284 varun.gupt 77
    		width: "550px",
78
    		height: "320px",
4237 varun.gupt 79
    		inline: true,
80
    		href: "<h3>Shopping with Saholic.com is completely safe</h3><br />" +
4284 varun.gupt 81
		"<b>1.</b> We are part of Spice Group - India's # 1 Mobile retailer.<br /><br />" +
82
		"<b>2.</b> We procure directly from the Manufacturers - Hence we only sell genuine products with full Manufacturer Warranty.<br /><br />" +
83
		"<b>3.</b> We provide free Next Day Delivery to most locations - You can check the delivery time to your location by entering your pin code on the product page.<br /><br />" +
6173 kshitij.so 84
		"<b>4.</b> We use the best Internet Security technology - Your payment is 100% secure.<br />",
4372 varun.gupt 85
			onComplete: function(){
6261 amit.gupta 86
				trackEventWithGA('Widget', 'Safe shopping sticky banner is clicked', '');
4372 varun.gupt 87
			}
4237 varun.gupt 88
    	});
89
	});
6245 kshitij.so 90
 
6552 kshitij.so 91
 
6970 kshitij.so 92
	$('.insuranceInfo').click(function(){
93
		$.colorbox({
94
    		width: "520px",
95
    		height: "280px",
96
    		inline: true,
97
    		href: "<h3 style='font-size:15px; text-align:center; font-weight:bold; margin-left:15px; margin-top:5px;margin-bottom:10px'>Exclusively at Saholic</h3>" +
98
    		"<ul style='text-align: justify; padding-right: 10px; width: 93%; padding-left: 16px; line-height: 25px;'>"+
99
    		"<li>Only Saholic brings to you an option to protect your smartphone against theft and burglary.</li>"+
100
    		"<li>While buying your favourite mobile from Saholic, you can opt for 1 year WorldWide theft insurance.</li>"+
101
    		"<li>Introductory offer - You can opt for insurance by paying an all inclusive nominal fee of 1.5% of price of your mobile.</li>"+
102
    		"<a target='_blank' href='/static/insurance-terms' style='float: right; text-decoration: none;'>Detailed Terms and Conditions</a>"+
103
    		"</ul>",
104
			onComplete: function(){
105
				trackEventWithGA('Widget', 'Insurance sticky banner is clicked', '');
106
			}
107
    	});
108
	});
109
 
110
 
6959 kshitij.so 111
	$('.emiInfo').click(function(){
6453 kshitij.so 112
		$.colorbox({
6967 kshitij.so 113
    		width: "590px",
114
    		height: "480px",
6453 kshitij.so 115
    		inline: true,
6970 kshitij.so 116
    		href: "<br />" +
6967 kshitij.so 117
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hdfc-icon.png' style='vertical-align: middle;'></div>"+
6968 kshitij.so 118
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. Completely free for 3 months.<br><a onclick='toggle(\"emi-table-hdfc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
6967 kshitij.so 119
    		"<div id='emi-table-hdfc' style='padding-left: 5px; display: none;'>"+
120
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
121
    		"<thead>"+
122
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
123
            "</thead>"+
124
            "<tbody>"+
125
            "<tr>"+
126
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
127
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
128
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
129
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
130
            "</tr>"+
131
            "<tr>"+
132
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
133
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>4.22%</td>"+
134
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>7.04%</td>"+
135
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>9.67%</td>"+
136
            "</tr>"+
137
            "</tbody>"+
138
            "</table>"+
139
            "<br>"+
140
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
141
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
6772 kshitij.so 142
    		"<br>"+
6967 kshitij.so 143
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
144
    		"</ul>"+
6959 kshitij.so 145
    		"<br>"+
6967 kshitij.so 146
    		"</div>"+
147
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/citi-icon.png' style='vertical-align: middle;'></div>"+
148
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. Completely free for 3 months. <br><a onclick='javascript:toggle(\"emi-table-citi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
149
    		"<div id='emi-table-citi' style='padding-left: 5px;display: none;'>"+
6970 kshitij.so 150
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 151
    		"<thead>"+
152
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='2'>All Inclusive Processing Fee*</th>"+
6772 kshitij.so 153
            "</thead>"+
154
            "<tbody>"+
155
            "<tr>"+
6970 kshitij.so 156
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
157
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 158
            "</tr>"+
159
            "<tr>"+
160
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>Free</td>"+
161
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray; text-align: center;'>4.22%</td>"+
162
            "</tr>"+
163
            "</tbody>"+
164
            "</table>"+
165
            "<br>"+
166
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
167
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
168
    		"<br>"+
169
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
170
    		"</ul>"+
171
    		"<br>"+
172
    		"</div>"+
173
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/icici-icon.png' style='vertical-align: middle;'></div>"+
174
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a  onclick='javascript:toggle(\"emi-table-icici\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
175
    		"<div id='emi-table-icici' style='padding-left: 5px;display: none;'>"+
176
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
177
    		"<thead>"+
6970 kshitij.so 178
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 179
            "</thead>"+
180
            "<tbody>"+
181
            "<tr>"+
182
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
6959 kshitij.so 183
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
184
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
185
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
186
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
187
            "</tr>"+
6772 kshitij.so 188
            "<tr>"+
6967 kshitij.so 189
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
190
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
191
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
192
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
193
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6772 kshitij.so 194
            "</tr>"+
6967 kshitij.so 195
            "</tbody>"+
196
            "</table>"+
197
            "<br>"+
198
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
199
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
200
    		"<br>"+
6970 kshitij.so 201
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 202
    		"</ul>"+
203
    		"<br>"+
204
    		"</div>"+
205
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/sbi-icon.png' style='vertical-align: middle;'></div>"+
206
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-sbi\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
207
    		"<div id='emi-table-sbi' style='padding-left: 5px;display: none;'>"+
208
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
209
    		"<thead>"+
6970 kshitij.so 210
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 211
            "</thead>"+
212
            "<tbody>"+
6772 kshitij.so 213
            "<tr>"+
6967 kshitij.so 214
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
215
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
216
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
217
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
218
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
6772 kshitij.so 219
            "</tr>"+
220
            "<tr>"+
6967 kshitij.so 221
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
222
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
223
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
224
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
225
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
226
            "</tr>"+
227
            "</tbody>"+
228
            "</table>"+
229
            "<br>"+
230
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
231
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
232
    		"<br>"+
6970 kshitij.so 233
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1000.</li>"+
6967 kshitij.so 234
    		"</ul>"+
235
    		"<br>"+
236
    		"</div>"+
237
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/hsbc-icon.png' style='vertical-align: middle;'></div>"+
238
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3 and 6 months. <br><a onclick='javascript:toggle(\"emi-table-hsbc\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
239
    		"<div id='emi-table-hsbc' style='padding-left: 5px;display:none;'>"+
6970 kshitij.so 240
    		"<table width='70%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
6967 kshitij.so 241
    		"<thead>"+
6970 kshitij.so 242
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 243
            "</thead>"+
244
            "<tbody>"+
245
            "<tr>"+
6970 kshitij.so 246
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>3 Months</th>"+
247
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 35%;'>6 Months</th>"+
6967 kshitij.so 248
            "</tr>"+
249
            "<tr>"+
250
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
251
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>5.58%</td>"+
6772 kshitij.so 252
            "</tr>"+
6967 kshitij.so 253
            "</tbody>"+
254
            "</table>"+
255
            "<br>"+
256
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
257
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
258
    		"<br>"+
6970 kshitij.so 259
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 1500.</li>"+
6967 kshitij.so 260
    		"</ul>"+
261
    		"<br>"+
262
    		"</div>"+
263
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/std-chartered-icon.png' style='vertical-align: middle;'></div>"+
264
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-std-chart\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
265
    		"<div id='emi-table-std-chart' style='padding-left: 5px;display: none;'>"+
266
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
267
    		"<thead>"+
6970 kshitij.so 268
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 269
            "</thead>"+
270
            "<tbody>"+
6772 kshitij.so 271
            "<tr>"+
6970 kshitij.so 272
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%%;'>3 Months</th>"+
6967 kshitij.so 273
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
274
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
275
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6772 kshitij.so 276
            "</tr>"+
277
            "<tr>"+
6967 kshitij.so 278
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
279
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
280
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
281
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6772 kshitij.so 282
            "</tr>"+
6967 kshitij.so 283
            "</tbody>"+
284
            "</table>"+
285
            "<br>"+
286
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
287
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
288
    		"<br>"+
6970 kshitij.so 289
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 290
    		"</ul>"+
291
    		"<br>"+
292
    		"</div>"+
293
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/kotak-icon.png' style='vertical-align: middle;'></div>"+
294
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-kotak\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
295
    		"<div id='emi-table-kotak' style='padding-left: 5px;display: none;'>"+
296
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
297
    		"<thead>"+
6970 kshitij.so 298
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 299
            "</thead>"+
300
            "<tbody>"+
6959 kshitij.so 301
            "<tr>"+
6967 kshitij.so 302
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
303
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
304
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
305
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 306
            "</tr>"+
307
            "<tr>"+
6967 kshitij.so 308
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
309
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
310
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
311
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
312
            "</tr>"+
313
            "</tbody>"+
314
            "</table>"+
315
            "<br>"+
316
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
317
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
318
    		"<br>"+
6970 kshitij.so 319
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 500.</li>"+
6967 kshitij.so 320
    		"</ul>"+
321
    		"<br>"+
322
    		"</div>"+
323
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/axis-icon.png' style='vertical-align: middle;'></div>"+
324
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 ,12 and 18 months. <br><a onclick='javascript:toggle(\"emi-table-axis\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
325
    		"<div id='emi-table-axis' style='padding-left: 5px;display: none;'>"+
326
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
327
    		"<thead>"+
6970 kshitij.so 328
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
6967 kshitij.so 329
            "</thead>"+
330
            "<tbody>"+
331
            "<tr>"+
332
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
333
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
334
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
335
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
336
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>18 Months</th>"+
337
            "</tr>"+
338
            "<tr>"+
339
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
340
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
341
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
342
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>11.53%</td>"+
343
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>16.72%</td>"+
6959 kshitij.so 344
            "</tr>"+
6967 kshitij.so 345
            "</tbody>"+
346
            "</table>"+
347
            "<br>"+
348
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
349
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
350
    		"<br>"+
6970 kshitij.so 351
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li><br><li>Minimum payment amount required to convert into EMI is Rs 2500.</li>"+
6967 kshitij.so 352
    		"</ul>"+
353
    		"<br>"+
354
    		"</div>"+
355
    		"<div style='display: inline-block; padding-left: 5px;' class='bank-logo'><img src='/images/indusind-icon.png' style='vertical-align: middle;'></div>"+
356
    		"<div class='emi-text' style='text-align: justify; height: 49px; padding-left: 3px; width: 397px; display: inline-block; vertical-align: top;'><p style='height: 38px; width: 420px;'>Available for 3, 6, 9 and 12 months. <br><a onclick='javascript:toggle(\"emi-table-indus\");' style='cursor: pointer; text-decoration: none;'>See Full Details</a></p></div>"+
357
    		"<div id='emi-table-indus' style='padding-left: 5px;display: none;'>"+
358
    		"<table width='85%' cellspacing='0' cellpadding='0' border='0' id='emiwidget' style='padding-top: 2px; padding-bottom: 2px; border-top-width: 0px; border-left-width: 0px;padding-left: 5px'>"+
359
    		"<thead>"+
360
            "<th style='border:1px solid gray;text-align: center;background-color: #F1F1F1;' colspan='5'>All Inclusive Processing Fee*</th>"+
361
            "</thead>"+
362
            "<tbody>"+
6959 kshitij.so 363
            "<tr>"+
6967 kshitij.so 364
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>3 Months</th>"+
365
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>6 Months</th>"+
366
            "<td style='border-width: 0px 0px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>9 Months</th>"+
367
            "<td style='border-width: 0px 1px 1px 1px; border-style: solid; border-color: gray;text-align: center; width: 9%;'>12 Months</th>"+
6959 kshitij.so 368
            "</tr>"+
369
            "<tr>"+
6967 kshitij.so 370
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>3.13%</td>"+
371
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>5.58%</td>"+
372
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 0px solid gray; text-align: center;'>8.47%</td>"+
373
            "<td style='border-bottom: 1px solid gray; border-left: 1px solid gray; border-right: 1px solid gray;text-align: center;'>11.53%</td>"+
6959 kshitij.so 374
            "</tr>"+
6772 kshitij.so 375
            "</tbody>"+
376
            "</table>"+
377
            "<br>"+
6967 kshitij.so 378
    		"<ul style='list-style : disc none none; padding-left: 20px; text-align:justify; line-height: 13px; padding-right: 10px; width: 83%;'>"+
379
    		"<li>Select EMI on Make Payment Page to see Monthly EMI payable and Total Amount Payable.</li>"+
380
    		"<br>"+
381
    		"<li>No charges will be levied by the bank.</li><br><li>Credit limit of full amount is needed and blocked at the time of buying on EMI.</li><br><li>As you pay the installments, correspondingly your credit limit increases.</li>"+
382
    		"</ul>"+
383
    		"<br>"+
384
    		"</div>"+
385
    		"<br><br>",
6453 kshitij.so 386
			onComplete: function(){
387
				trackEventWithGA('Widget', 'Emi info widget is clicked', '');
388
			}
389
    	});
390
	});
6245 kshitij.so 391
 
6792 vikram.rag 392
	$('a.mk_best_deal_detail').live('click', function(){
393
		var offerLinkHtml = '';
394
		if(OFFER_HELP_LINK!='$OFFER_DETAIL_LINK') {
6795 vikram.rag 395
			offerLinkHtml = '<a target="_blank" href="' +OFFER_HELP_LINK + '" style="z-index: 1; float: right; bottom: 0px; right: 0px; margin: 15px; position: relative;">More</a></span>';
6792 vikram.rag 396
		}
397
		$.colorbox({
398
			width: "550px",
399
    		height: "300px",
400
    		inline: true,
401
    		href: '<h3 style="text-align: left; padding: 10px;">Offer Details</h3>' +
402
    			'<p style="text-align: justify; line-height: 22px; margin: 12px;">' + OFFER_HELP_TEXT +
403
    			'</p><span class="right">' + offerLinkHtml 
404
		});
405
	});
6453 kshitij.so 406
 
6792 vikram.rag 407
 
6245 kshitij.so 408
	$('#pickupstoreInfo').click(function(){
409
		$.colorbox({
410
    		width: "550px",
411
    		height: "370px",
412
    		inline: true,
413
    		href: "<h3>Frequently Asked Questions</h3><br />" +
414
		"<b>Q)</b> What is 'Buy Online & Pickup in Store' ?<br /><br />" +
415
		"<b>A)</b> Buy Online from Saholic.Com and pickup your product from the nearest Spice Hotspot Retail Store.<br /><br />" +
416
		"<b>Q)</b> How do i avail this facility ?<br /><br />" +
417
		"<b>A)</b> Simply select Pickup In Store On the Shipping Page and select your nearest store. Please note this facility is available only in Delhi/NCR.</a><br /><br />"+
418
		"<b>Q)</b> When will the product be available for pickup ?<br /><br />" +
419
		"<b>A)</b> You can enter your pin code on the Product Page to find estimated time to deliver. After placing the order we will also give you the estimated date for pickup.</a><br /><br />",
420
 
421
			onComplete: function(){
6262 amit.gupta 422
				var ev = "Product Page";
6303 amit.gupta 423
				var label = window.location.pathname;
6264 amit.gupta 424
				if (label=="" || label=="#")
6261 amit.gupta 425
				{
6303 amit.gupta 426
					label = "";
6262 amit.gupta 427
					ev = "Home Page";
6261 amit.gupta 428
				}
6262 amit.gupta 429
				else if (label.indexOf("shipping") != -1){
430
					ev = "Shipping Page";
431
					var blkstr = [];
6263 amit.gupta 432
					jQuery("#cartDetail").find("span.cart-item-name").each(function(key,str){
6262 amit.gupta 433
						blkstr.push(str);
434
					});
6303 amit.gupta 435
					label = blkstr.join(", ");
436
				} else if (label.substr(label.lastIndexOf('/') + 1).length==5 && typeof label.substr(label.lastIndexOf('/') + 1) =="number") {
437
					ev = "Category Page";
438
				} else if (label.substr(label.lastIndexOf('-') + 1).length==7  && typeof label.substr(label.lastIndexOf('-') + 1) =="number") {
439
					ev = "Product Page";
6262 amit.gupta 440
				}
6261 amit.gupta 441
				trackEventWithGA('Pickup in Store LightBox', ev, label);
6245 kshitij.so 442
			}
443
    	});
444
	});
4126 varun.gupt 445
 
5420 amit.gupta 446
	$('.common-widget-top-bar').live('click', function(e, callback){
4126 varun.gupt 447
		var isColapsed = $(this).data('is_colapsed') == true ? true : false;
448
		var widgetBox = $(this).siblings('.common-widget-content-area');
449
		var controlBox = $(this).siblings('.common-widget-control-bar');
450
		var controlBoxArrowImg = $(this).find('img');
4210 varun.gupt 451
 
4126 varun.gupt 452
		if (isColapsed)	{
453
			if(controlBox.length > 0)	{
454
				$(controlBox).slideDown('fast', function(){
5420 amit.gupta 455
					$(widgetBox).slideDown('fast', callback);
4126 varun.gupt 456
					$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
457
				});
458
			} else	{
459
				$(widgetBox).slideDown();
460
				$(controlBoxArrowImg).attr('src', '/images/IconDownArrow_UnselectedTab.png');
461
			}
462
		} else	{
463
			$(widgetBox).slideUp(function(){
464
				$(controlBox).slideUp('fast');
465
				$(controlBoxArrowImg).attr('src', '/images/IconRightArrow_UnselectedTab.png');
466
			});
467
		}
468
		$(this).data('is_colapsed', !isColapsed);
469
	});
470
 
471
	/**
472
	 * Update count of products checked for comparison
473
	 **/
474
	$('#myresearch input[type="checkbox"]').live('click', function(){
4798 varun.gupt 475
		updateCompareCount();
4126 varun.gupt 476
	});
477
 
478
	$("#research_compare").live('click', function(){
479
		var seldata = "";
5322 amit.gupta 480
		var prodnames = "";
4126 varun.gupt 481
		var tot = 1;
482
		var saprt = "";
483
		var par = $('#myresearch').find('input[type=checkbox]:checked');
4926 varun.gupt 484
		var haveSameProductType = true;
485
		var productType = null;
486
 
4126 varun.gupt 487
		$(par).each(function(){
4926 varun.gupt 488
 
489
			if(productType != null && productType != $(this).attr('producttype'))	{
490
				haveSameProductType = false;
491
			}
492
			productType = $(this).attr('producttype');
493
 
4126 varun.gupt 494
			if(tot == 1)	{
5358 amit.gupta 495
				prodnames += $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 496
				seldata += "p" + tot + "=" + $(this).val();
497
			} else	{
498
				seldata += "&p" + tot + "=" + $(this).val();
5358 amit.gupta 499
				prodnames += "-vs-" + $(this).attr("title").replace(/ +/g, '-').replace(/\/+/g,'-').replace(/-+/g,'-').toLowerCase();
4126 varun.gupt 500
			}
501
			tot ++;
502
		});
4984 varun.gupt 503
 
4926 varun.gupt 504
		if(! haveSameProductType)	{
505
			alert("Only products of same category can be compared");
506
		} else if(tot > 6)	{
4126 varun.gupt 507
			alert("Can compare upto five products only.");
508
		} else if(tot > 2)	{
5552 phani.kuma 509
			window.location = "/compare-" + productType.replace(/ +/g, '-').toLowerCase() + "/" + prodnames + "?" + seldata+"&fromsrc=comparison_widget";
4126 varun.gupt 510
		} else	{
511
			alert("Please select atleast two products");
512
		}
513
	});
514
 
515
	$("#research_delete").live('click', function(){
516
		var research_tot = $("#research_total").val();
517
		var seldata = [];
518
		var tot = 0;
519
		var saprt = "";
520
		var par = $('#myresearch').find('input[type=checkbox]:checked');
521
 
522
		$(par).each(function(){
523
			seldata.unshift($(this).val());
524
			tot ++;
525
		});
526
 
527
		if(tot > 0)	{
528
			var t = (research_tot * 1) - (tot * 1);
529
			$("#research_total").val(t);
530
 
531
			jQuery.ajax({
532
				type: "GET",
533
				url: "/deletefromresearch/[" + seldata + "]?_method=delete",
534
				success: function(msg)	{
535
					jQuery.each(seldata, function(intIndex, objValue){
536
						delete_from_storage_set("resitems", objValue);
537
						$("#myresearch").find("#" + objValue).fadeOut('slow', function() {
538
							$(this).remove();
539
							if(t === 0)	{
540
								$("#research_default").css("display", "block");
541
							}
542
						});
543
					});
4984 varun.gupt 544
 
4922 varun.gupt 545
					//Updating the count
546
					$('#research_compare_count').html($('#myresearch input[type="checkbox"]:checked').length - seldata.length);
4984 varun.gupt 547
 
548
					if ($('#myresearch input[type="checkbox"]').length - seldata.length <= 0)	{
549
						$("#myresearch").children(".common-widget-top-bar").trigger('click');
550
					}
4126 varun.gupt 551
				}
552
			});
553
		} else	{
554
			alert("Please select atleast one product");
555
		}
556
	});
557
 
558
	// No uid cookie
559
	if (!$.cookie("uid"))	{
560
		// No uid in storage
561
		if (!$.Storage.get("uid"))	{
562
			if (!$.Storage.get("resitems"))	{
563
				$.Storage.set("resitems", "[]");
564
			}
565
			if (!$.Storage.get("histitems"))	{
566
				$.Storage.set("histitems", "[]");
567
			}
568
		}
569
		else	{			// uid in storage : logout
570
			$.Storage.remove("uid");
571
			$.Storage.set("resitems", "[]");
572
			$.Storage.set("histitems", "[]");
573
		}
574
		load_research_widget();
575
		load_history_widget();
576
	}
577
	else	{				// With uid cookie
578
		var cookie = $.cookie("uid");
579
		// Just logged in merge storage items
580
		if (!$.Storage.get("uid"))	{
581
			$.Storage.set("uid", cookie);
582
			merge_history_items();
583
			load_research_items();
584
		}
585
		else	{
586
			// UID changed
587
			if ( cookie != $.Storage.get("uid"))	{
588
				$.Storage.set("uid", cookie);
589
				$.Storage.set("resitems", "[]");
590
				$.Storage.set("histitems", "[]");
591
				merge_history_items();
592
				load_research_items();
593
			}
594
			else	{		// Uid is same
595
				if (!$.Storage.get("resitems"))	{
596
					$.Storage.set("resitems", "[]");
597
					load_research_items();
598
				}
599
				else	{
600
					load_research_widget();
601
				}
602
 
603
				if (!$.Storage.get("histitems"))	{
604
					$.Storage.set("histitems", "[]");
605
					merge_history_items();
606
				}
607
				else	{
608
					load_history_widget();
609
				}
610
			}
611
		}
612
	}
4798 varun.gupt 613
 
614
	function load_research_items(){
615
		jQuery.ajax({
616
			type: "GET",
617
			url: "/myresearch",
618
			cache: false,
619
			success: function(json) {
620
			    $.Storage.set("resitems", json);
621
			    load_research_widget();
622
		    }
623
		});
624
	}
625
 
626
	function load_research_widget(){
627
		var myResearchWidgetContainer = $("#myresearch");
628
 
629
		if($(myResearchWidgetContainer).length == 0) {
630
			return;
631
		}
632
		var resitems = $.Storage.get("resitems");
633
 
634
		if (resitems == "[]") {
635
			var emptyResWidgetHtml = '<table border="0" width="100%" cellspacing="1" cellpadding="0" id="research_default">\
636
		      <tbody>\
637
		        <tr><td align="center"><b>Add items to compare list</b></td></tr>\
638
		       </tbody>\
639
		      </table>';
640
			$(myResearchWidgetContainer).find(".common-widget-content-area").html(emptyResWidgetHtml);
641
			$(myResearchWidgetContainer).children(".common-widget-top-bar").trigger('click');
642
			return;
643
		}
644
		var params = "/" + resitems;
645
 
646
		jQuery.ajax({
647
			type : "GET",
648
			url : "/myresearch" + params,
649
			cache: true,
650
			success : function(html) {
651
	   		    $("#myresearch").html(html);
652
	   			updateCompareCount();
653
 
654
			    // Product Title
655
			    $("#myresearch table td div a.truncate").each(function() {
656
						$(this).truncate({addtitle : true});
657
			    });
658
 
659
			    // Product Price
660
			    $("#myresearch table td div div.price").each(function() {
661
						$(this).truncate({addtitle : true});
662
				});
663
 
664
			    // Product Details
665
			    $("#myresearch table td div div.text").each(function() {
666
						$(this).truncate( {addtitle : true});
667
				});
668
		    }
669
		});
670
	}
4126 varun.gupt 671
});